问题
Using expo, I need to provide a text-file with data (a word-dictionary) to the app. How do I provide that and how do I read it into memory?
回答1:
I translated my textfile to a json-formatted content. This can very easy be used. The json is parsed automatically.
import data from './assets/woerter.json';
来源:https://stackoverflow.com/questions/63104357/what-is-the-proper-way-to-bundle-a-textfile-with-the-app