User Story
As a software developer,
I want to update the deprecated ReactDOM.render method to createRoot in our React application
so that the application can leverage React 18+ features like concurrent rendering and remains compatible with future updates.
Background
React 18 deprecated ReactDOM.render in favor of createRoot to enable concurrent rendering capabilities. The current implementation in frontend/src/index.js uses the outdated method, which may block upgrades to newer React versions and prevent the use of modern features. The frontend’s package.json currently specifies React 17.0.2, so dependencies will also need updating to React 18+. Failing to address this could lead to technical debt and compatibility issues. The Docker setup for the frontend mounts the src directory, so changes to index.js will reflect without a full rebuild.
Acceptance Criteria
User Story
As a software developer,
I want to update the deprecated
ReactDOM.rendermethod tocreateRootin our React applicationso that the application can leverage React 18+ features like concurrent rendering and remains compatible with future updates.
Background
React 18 deprecated
ReactDOM.renderin favor ofcreateRootto enable concurrent rendering capabilities. The current implementation infrontend/src/index.jsuses the outdated method, which may block upgrades to newer React versions and prevent the use of modern features. The frontend’spackage.jsoncurrently specifies React 17.0.2, so dependencies will also need updating to React 18+. Failing to address this could lead to technical debt and compatibility issues. The Docker setup for the frontend mounts thesrcdirectory, so changes toindex.jswill reflect without a full rebuild.Acceptance Criteria
frontend/src/index.jsto replaceReactDOM.renderwithcreateRootas per React 18+ syntax.reactandreact-domversions infrontend/package.jsonto at least 18.2.0.frontend/srcreflects the changes without requiring a full container rebuild.frontend/src/App.jsstill successfully retrieves data from the backend after the update.npm startlocally and viadocker-compose upto verify consistent behavior.