Closed xxsnakerxx closed 2 years ago
hi!
Do you use js_override
in your rnucrc.js
?
First of all - thanks for the contribution,
I tend to disagree with this approach: the library relies heavily on codegeneration. normally when dependencies are reinstalled code gets wiped and environment must be initialized again - this is kind of by design . I would prefer it tell me I need to inject variables rather than think they are still correct when in fact they are undefined.
I use the js_override
but it's false. If I don't need the overriding feature the library shouldn't break my app after reinstalling dependencies.
Maybe create folder override
with its own index.js which will import override.js
So, if I don't need the overriding feature I do
import env from 'react-native-ultimate-config';
If I need overriding, then
import env from 'react-native-ultimate-config/override';
and js_override
can be removed
It prevents errors after re-installing dependencies