React + Redux + React Native Starter Kit with reusable business logic. Sample TODO app built in.
https://youtu.be/9S3mpotVgXg?t=1833
- Demo of how the code can be reused between React and React Native Application
- Extracts the business logic to a seperate npm package
- Uses Redux to write application business logic: Actions and Reducers are extracted to a seperate npm package.
- web: A web application created using Create React App
- mobile: Mobile app created using React Native cli
- core: The npm package which contains extracted business logic(Actions, Reducers etc). This is reused in both web and mobile
npm install
andnpm link
in Corenpm install
andnpm link core
in Web and Mobile
-
Use Lerna and Yarn workspace to manage multiple packages. Here are couple of good implementations
https://github.com/fixerteam/React-Native-monorepo
https://github.com/drgx/react-native-plus-web -
Use React Native Web
https://blog.logrocket.com/the-state-of-react-native-web-in-2019-6ab67ac5c51e/