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

React starter to upgrade #35

Closed
johnMinelli opened this issue Apr 5, 2022 · 2 comments
Closed

React starter to upgrade #35

johnMinelli opened this issue Apr 5, 2022 · 2 comments
Assignees

Comments

@johnMinelli
Copy link

Hi, there is an error in the React starter code since an upgrade to ReactDOMv6 https://reactrouter.com/docs/en/v6/upgrading/v5

I'll put here the correction in order to adjust the docs

old
import { BrowserRouter as Router, Switch, Route, Link } from 'react-router-dom
new
import { BrowserRouter as Router, Routes, Route, Link } from 'react-router-dom';

old

<PlasmicRootProvider loader={PLASMIC}>
     <Router>
        <Switch>
           <Route component={CatchAllPage} />
        </Switch>
     </Router>
</PlasmicRootProvider>

new

<PlasmicRootProvider loader={PLASMIC}>
   <Router>
      <Routes>
         <Route path="/" element={CatchAllPage()}/>
      </Routes>
   </Router>
</PlasmicRootProvider>
@yang
Copy link
Contributor

yang commented Apr 5, 2022

@johnMinelli Thank you for sharing this! Fixing.

@yang yang self-assigned this Apr 5, 2022
@yang
Copy link
Contributor

yang commented Apr 6, 2022

Fix is live.

@yang yang closed this as completed Apr 6, 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

2 participants