Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rn项目如何打开.txt文件 #656

Closed
gzh1612 opened this issue Oct 29, 2022 · 3 comments
Closed

rn项目如何打开.txt文件 #656

gzh1612 opened this issue Oct 29, 2022 · 3 comments

Comments

@gzh1612
Copy link

gzh1612 commented Oct 29, 2022

新创建一个项目
在项目目录下创建 a.txt文件
想在App.js中使用这个文件并且以string类型输出。
该如何操作呢

@sunnylqm
Copy link

sunnylqm commented Oct 29, 2022

先配置metro
facebook/metro#176 (comment)

然后可以直接import/require

@gzh1612
Copy link
Author

gzh1612 commented Nov 16, 2022

我用这个方法拿到的是一个number类型的编号,如何根据这个编号获取到文本中的内容呢?

@gzh1612
Copy link
Author

gzh1612 commented Feb 11, 2023

我用其他方法解决了这个问题,谢谢

@gzh1612 gzh1612 closed this as completed Feb 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants