How to load local text file into string variable in React Native Project?

Posted by Jessica Taylor | Updated on

Want to load local text file into string variable in ReactNative Project? Create a constants.js like below, where you are exporting the constants.

Then in whatever file you are trying to import it, import it as.


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers