Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch is not exported from react-router-dom@6 #2

Open
bozsudo opened this issue May 8, 2022 · 0 comments
Open

Switch is not exported from react-router-dom@6 #2

bozsudo opened this issue May 8, 2022 · 0 comments

Comments

@bozsudo
Copy link

bozsudo commented May 8, 2022

NOTE: When using react-router-dom >v5 you will need to replace the Switch with Router and component with element.

From:
<Switch> <Route exact path='/' component={ProjectsList} /> </Switch>

To:
<Routes> <Route exact path='/' element={<ProjectsList />} /> </Routes>

@bozsudo bozsudo changed the title Switch is not exported from react-router-dom@5 Switch is not exported from react-router-dom@6 May 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant