Closed jmaguirrei closed 7 years ago
Thus far, I've found it easier to maintain separate projects for a server/web version and a react native version. You could do something like create a shared lib as a git submodule or even a node package, or just symlink it, so your folder structure is something like this:
In addition to being easier overall, with meteor not being fully installable via NPM, and with select parts of NPM not being available in react native (a couple built-in libraries), I would expect using one project would create bugs here and there.
If you're trying to share UI components, then I think it gets more complicated, since you could technically share a lot of code, but you need to "smartly" swap out react-native with home-built web components (I think there are a couple of react-native web libraries, as well)
Yes, I agree with you. Just discover a plugin for Sublime Text that sync a file to another, so I can share constants, functions and assets from one project to another. Thanks
Is it possible (and a good idea) to have only one project for Meteor (with React) and RN app? So one package.json file, one node_modules.
The goal is to share constants and functions that are the same in both clients, a DRY approach.
I dont know if: a) Its possible, or a RN project has some restrictions. b) Is it a good idea, because could affect the size/performance of the RN App.
Thanks.