Also updates the rendering method in the application to use the new createRoot() API introduced in React 18. The previous implementation used ReactDOM.render(), which is now deprecated and generates a warning. The changes in this PR ensure that the application remains compatible with the latest version of React and follows best practices.
Key changes:
Replaced the import of ReactDOM with createRoot from react-dom/client.
Updated the rendering code in index.js to use the new createRoot() API instead of the deprecated ReactDOM.render() method.
Updated dependencies to:
Also updates the rendering method in the application to use the new
createRoot()
API introduced in React 18. The previous implementation usedReactDOM.render()
, which is now deprecated and generates a warning. The changes in this PR ensure that the application remains compatible with the latest version of React and follows best practices.Key changes:
Replaced the import of
ReactDOM
withcreateRoot
fromreact-dom/client
. Updated the rendering code inindex.js
to use the newcreateRoot()
API instead of the deprecatedReactDOM.render()
method.Related documentation: https://reactjs.org/link/switch-to-createroot