reallynotburner / rn_web_monorepo

React Native in Web, iOS, Android with one repo, common components for all.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incompatible with React-navigation

reallynotburner opened this issue · comments

I worked on this all day, could not get react-navigation working with this monorepo. I can do it with default RN projects, npx react-native init AwesomeProject, then following the install steps per:

https://reactnavigation.org/docs/en/getting-started.html

yarn add react-navigation -W
yarn add react-native-reanimated react-native-gesture-handler react-native-screens react-native-safe-area-context -W
yarn add react-navigation-stack @react-native-community/masked-view
yarn (which runs Pod install)

All kinds of googling and experimenting, manually trying to install modules to solve for many many errors in native display.

I mean it's patently absurd to demand consumers of react-navigation to not be able to use in unless you manually install all these manual dependencies. I haven't encountered anything so ridiculous before with a react dependency.

For now, I give up. use https://renative.org/. It's hello-world template includes basic navigation setup.

I have made this work easily with react-router. See this repo built from this repo as a template: https://github.com/reallynotburner/rn_mono_router. For now, I'm going to "blame" react-navigation for being too complex for it's own good, and recommend that we use react-router instead. Not an intrinsic failure of rn_web_monorepo.