Do you know what is the correct way of building this project with react?
I can only pass 12 tests and I don’t understand what is wrong anymore. If I could find a good example I could understand better.
Can you share with us the link to the project, the tests that are not passing and then all of your code you currently have. Is your code just in the challenge editor or are you using codepen by chance? When you reply to a comment you can use the format button which looks like </> and paste all your code between the lines it gives you.
We would need all three to be better able to help you, and see whats going on
Switching to the old render method makes it pass 15/16 (React 18 issue with the test)
ReactDOM.render(<App />, document.getElementById('root'))
For the last test
The sequence “5 * - + 5” = should produce an output of “10” : expected ‘-25’ to equal ‘10’
That fails when inputting it manually as well.
react_dom_client__WEBPACK_IMPORTED_MODULE_1__.render is not a function
I pasted the code and got this error.
You need to change the import as well.
index.jsx
import React from 'react'
// import ReactDOM from 'react-dom/client'
import ReactDOM from 'react-dom'
import App from './App'
// ReactDOM.createRoot(document.getElementById('root')).render(
// <App />
// )
ReactDOM.render(<App />, document.getElementById('root'))
I don’t know how to thank you I was lost at this point and you really saved me. My main problem is solved but I wonder how render method effects the tests is it because of my solution and how could I wrote this code clean?
You can look at the issue we still have open.
It doesn’t have anything to do with your code, it has to do with changes React made.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.