Writing a library is so much nicer than writing an app. You can concentrate on the core thing you want to achieve and need to handle just a few files.

And you can still test it live even if it's a node module: just symlink it into the node_modules folder of your app.

  • 1
    By symlink you mean you use `npm pack`?
  • 1
    @Santaclauze Actually it is a react-native lib which means an Objective-C and a Java part. The small JS part I did not change anymore so I really just removed the installed node_module and put a symlink there to the lib folder (which is a different repository) instead.
  • 1
    I was in my first years of coding when i eas introduced to sym linking librairies into apps. Was not always very stable and lead to many headaches.

    Npm pack was like a blessing after that :)
  • 1
    @Santaclauze It was just for a quick test. But the library probably should have tests by itself too: I just broke it with a faulty config (which you can easily provide from JS). It needs to be validated at the native side.
Add Comment