- Upgrade all
<Switch>
elements with<Routes>
<Route children>
from the v5 app changed to<Route element>
<Redirect>
elements should be replaced with<Navigate>
element<Route path>
and<Link to>
are relative<Route exact>
is gone. Instead, routes with descendant routes (defined in other components) use a trailing * in their path to indicate they match deeply- Rename
<NavLink exact>
to<NavLink end>
- Remove
activeClassName
andactiveStyle
prop from<NavLink />
<NavLink to="/messages" className="nav-link" activeClassName="activated" className={({ isActive }) => "nav-link" + (isActive ? " activated" : "")} > Messages </NavLink>
- When using a nested config, routes with
children
should render an<Outlet>
in order to render their child routes. - Use
useNavigate
instead ofuseHistory
<Prompt>
is not currently supported
- Test code
- Optimize code
- Build app for production
- Upload production code to server
- Configure server
- $ npm run build
- Step 1: Install the Firebase CLI
$ npm install -g firebase-tools
- Step 2: Initialize your project
$ firebase init hosting
- Step 3: Deploy to your site
$ firebase deploy --only hosting
- Step 1: Stops serving Firebase Hosting traffic for the active Firebase project.
$ firebase hosting:disable
- Step 2: Delete hosting deployment in release history of the Firebase project by clicking on Delete context menu item of the release