I am developing an app which would have both a web app created using React and a mobile app developed using expo. I want to be able to share some code between them including some components like context providers etc.
I have searched a lot and found some ways to do this but unfortunately none of them work if I want to use some shared React components. For example following the instructions on https://github.com/altick/cra-expo-monorepo works for simple typescript code sharing but if I have an context providers then it gives error when I use it, stating it is an invalid hook call.
Any help in this matter would be appreciated
1.4m articles
1.4m replys
5 comments
56.9k users