Whats the best way to I18n in a partial react native app?

201 Views Asked by At

I want to integrate a small react native view in an existing app completely written in Obj C. The most popular library available assumes that all strings are loaded in memory on the JS side. I am concerned that this might end up causing the app to use to much memory and potentially crash? Note that I haven't done any subjective testing via instruments yet but wondering how other people are solving this problem?

1

There are 1 best solutions below

0
On

With React Native's architecture, all instructions are inherently in memory at all times. To get around that, you would need to write a native plugin that could read from the file system and get localized strings, or use something like React Native FS: https://github.com/johanneslumpe/react-native-fs