v3.0.0
-
Upgrade to React 18 (@marcoandre1)
To install the latest version of React:
npm install react react-dom
NOTE: see commit details Bump react react-dom
-
Fix #162 [BUG]: hydrateRoot(...): Target container is not a DOM element. Particular attention to the parameters inversion in the NEW hydrate function:
hydrate(<App tab="home" />, container)
vshydrateRoot(container, <App tab="home" />)
. (@marcoandre1)Extract from How to Upgrade to React 18:
Finally, if your app uses server-side rendering with hydration, upgrade
hydrate
tohydrateRoot
:// Before import { hydrate } from 'react-dom'; const container = document.getElementById('app'); hydrate(<App tab="home" />, container); // After import { hydrateRoot } from 'react-dom/client'; const container = document.getElementById('app'); const root = hydrateRoot(container, <App tab="home" />); // Unlike with createRoot, you don't need a separate root.render() call here.
-
Upgrade to React Router v6 (@marcoandre1)
Upgrade all
<Switch>
elements to<Routes>
.
<Route exact>
is gone.
<Route element>
replaces<Route render>
props. (see Upgrade to React Router v5.1)
useParams
inside your route component retrieves params. (see Upgrade to React Router v5.1)NOTE: see commit details Bump react-router-dom to v6
-
Upgrade to react-redux 8 (@marcoandre1)
Add useSelector() hook
Allows you to extract data from the Redux store state, using a selector function.
The selector is approximately equivalent to the mapStateToProps argument to connect conceptually.NOTE: I had to change to
useSelector()
in theDashboard
component instead ofmapStateToProps()
because of the upgrade to React router v6. See commit details Add useSelector hook -
Bump
@headlessui/react
because previous version incompatible with React 18. (@marcoandre1)