0.19.0
What's Changed
- Support Vite 2.8+
- Fix illegal invocation in CFW
- Update to React Router v6
Upgrade guide for React Router v6
package.json
-"react-router-config": "^5.0.2",
-"react-router-dom": "^5.2.0"
+"react-router-dom": "^6.2.2"
App.jsx
-import { Link, Route, Switch } from 'react-router-dom'
+import { Link, Route, Routes } from 'react-router-dom'
- <Switch>
+ <Routes>
{router.routes.map((route) => {
return (
- <Route key={route.path} path={route.path}>
- <route.component route={route} baseUrl={baseUrl} />
- </Route>
+ <Route
+ key={route.path}
+ path={route.path}
+ element={<route.component route={route} baseUrl={baseUrl} />}
+ />
)
})}
- </Switch>
+ </Routes>
Full Changelog: v0.18.2...v0.19.0