stephane-klein / react-vite-monorepo-poc

Repository to test to setup a monorepo based on React + Vite.js
https://github.com/stephane-klein/backlog/issues/36
0 stars 0 forks source link

Configure SPA with react-router version 5.3.3 #2

Closed stephane-klein closed 2 years ago

stephane-klein commented 2 years ago

Configure SPA with https://github.com/remix-run/react-router version 5.3.3, setup some pages.

stephane-klein commented 2 years ago
stephane@nuc-i7:~/git/github.com/stephane-klein/react-vite-monorepo-poc $ pnpm install
Packages: +13
+++++++++++++
Progress: resolved 300, reused 279, downloaded 0, added 0, done

dependencies:
+ react-router 5.3.3 (6.3.0 is available)
+ react-router-dom 5.3.3 (6.3.0 is available)

 ERR_PNPM_PEER_DEP_ISSUES  Unmet peer dependencies

.
└─┬ react-router 5.3.3
  └─┬ mini-create-react-context 0.4.1
    └── ✕ unmet peer react@"^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0": found 18.2.0

hint: If you don't want pnpm to fail on peer dependency issues, add "strict-peer-dependencies=false" to an .npmrc file at the root of your project.

I'm not sure that react-router 5.3.3 is compatible with React 18.2.0, reading this https://github.com/remix-run/react-router/pull/8831, I have the feeling that yes, well, I'll try 🤞.

stephane-klein commented 2 years ago

Documentation for v5 https://v5.reactrouter.com/web/guides/quick-start

stephane-klein commented 2 years ago

Done https://github.com/stephane-klein/react-vite-monorepo-poc/commit/858ddfa18b70a4ad83919f513eaa8df1779b60a5