UncaughtTypeError: react dom WEBPACK IMPORTED MODULE | White blank screen SOLVED in React JS
ฝัง
- เผยแพร่เมื่อ 15 ต.ค. 2024
- How to solve Uncaught TypeError: react_dom__WEBPACK_IMPORTED_MODULE_1__.createRoot is not a function at ./src/index.js (index.js:7:1) at options.factory (react refresh:6:1) at _webpack_require_ (bootstrap:24:1) at startup:7:1 in react js is shown
Thanks bro... You solved my problem 🙌🥺 that thing wasted my 2-3 days
Glad I could help you bro!!
i am still getting the same error and the screen is white yet
Are you trying to downgrade to react 17 from 18?
Pls,describe that why the previous code didn't work
because the react versions are different, so the code has to be changed
Didnt work for me. my react and dom version is 18.3.1
I have converted react js to 17, what are you trying to do?
Solved! Thank you!
You're welcome!
did you just downgraded??
Yeah from 18 to 17
@@unitedtoptech6288 most of my project is written with V18. I understand that I'm gonna have to rewrite some stuff for it to work as I want it to
Am I gonna miss important features ?
I'm a beginner
17 and 18 have similar code and most of the dependency packages work without any code change
@@uliseshumbertosaucedacordo874 You can upgrade your react by changing your package.json to require react and react-dom to be "^18.0.0" then run "npm install" from your command line in your project directory and rebuild your app. See his screenshot at 0:35 where he requires only react 17.0.2
Thankyou man god bless you
Thank you too
❤
cool
its already 2024
Yeah I know so?
❤❤❤❤
Welcome!!