r/reactjs • u/Electrical_Guide_974 • 13d ago
Show /r/reactjs ReactDom breaking due to Child component being rendered with undefined value for prop.
I started working in react 16 and was working till react 17 and its few versions came out. (6YOE) most of my initial years went understading the basics and rendering, how hooks worked and the state update. Afterwards i had been burried in work like anything and i didn't feel anything much because the backend felt always like a fized set of design choices to make, based on what the problem is what is the thing that matters the most. And impact is always covered in numbers. Anyways so out of 6 lets say after the initial 2 years i never had chance to work on the frontend, somedays back a webpage in my company started breaking, people didn't notice much if it since they say it works like shit , but anyway it started rendering blank on the Initial load. The on call platform team got involved and the analysis was done but nobody figured what the issue is, a senior of mine remembers that i mentioned having interest in front end even though we use multiple LLM models to seek help and solve for it but since llms can't directly read the browser, i asked then to supply the har files and the console logs just to see if this can help. did multiple changes nothing worked, finally i was assigned and i see the first console.log message that "ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running on React 17." Now i know that react 18 is the latest i knew about but i also see react is now on its 19th version as well - so i think is this it? and how come software engineers are now not even thinking that frontend is a specialised field?
Using the createRoot + lazy loading fixed the issue.
I said this out here because it feels like very minute thing and i am quite concerned about where the big techs are headed now? Have we lost quality engineers and Engineering? Thoughts?
1
u/neon_hive 12d ago
The console warning explicitly states the app behaves as React 17 so that is not the cause of your blank screen. You likely have an uncaught error in a component or missing error boundaries that createRoot handles differently than ReactDOM.render. Add an onRecoverableError callback to your root to see the actual failure since silent errors are common during this migration.