Closed JiriHoffmann closed 2 years ago
@JiriHoffmann I agree, it becomes painful but at the time of writing, i was unable to get the example app to work with symlinked local package as you know react native does not support symlinking local packages and with JSI it becomes a bit more complicated.
However recently I have been able to symlink my own library so I will update those changes here soon. Thanks for bringing this to my attention.
Okay, cool! I just wasn't sure if there was any other reasoning for it. I recently created a library react-native-clusterer and was able to symlink it as well. I also made some changes to the build.gradle to clean it up pretty nicely. I still have to test it out in production builds but I don't see a reason, why it shouldn't work. If you want me to update the template and make a PR, let me know.
@JiriHoffmann A PR would be really helpful.
Here's how I have made it work: https://github.com/ammarahm-ed/react-native-mmkv-storage
Hi,
I was just wondering if there was a specific reason why you chose to import the package in the example like this:
https://github.com/ammarahm-ed/react-native-jsi-template/blob/1a923388bcbf0e9672c2f97dc133904dd1fda861/example/package.json#L15
Instead of keeping it how it's originally set up by npx create-react-native-library. Meaning it's imported in the
Podfile
for iOS and insettings.gradle
,build.gradle
, andMainApplication.java
on Android.From my understanding, imports via package.json (the way you have it now) will create a copy of the template inside node_modules which means that changes made to the template will not be reflected unless it is reinstalled with
npm
oryarn
.I understand that the import in package.json looks much cleaner, but it significantly slows down the workflow so for development purposes wouldn't it make sense to keep the setup by npx create-react-native-library? Unless there is some obvious reason that I am missing.