I am developing a button ui package for react native. I try to build an example project to test this button. The directory structure is as follows:
my-button
Try to run
npm run watch
inside the button package. Currently, I'm using this to apply changes from the library to my main project. Please let me know if it works!
The npm link
command doesn't work because React Native packager doesn't support symlinks.
After a little research, I discovered that there are two ways to go about it.
npm link
as usual.file:../
and then edit files in node_modules
folder or reinstall every time you make changes.I found Haul to work great for this use-case and even set-up a little starter project that also includes storybook, which is really helpful if you have many components to switch between.