你好,我是 React Native 的新手。
我按照下面的链接构建了我的第一个项目,但发现没有 index.ios.js 或 index.android.js 可供我编辑:
https://facebook.github.io/react-native/docs/getting-started.html https://facebook.github.io/react-native/docs/getting-started.html
仅创建App.js,
请问如何分别针对ios和android进行编辑?
谢谢!
对于React Native的最新版本(0.49.3),似乎不再支持“index.android.js”和“index.ios.js”单独的入口路由。开发人员文档建议我们使用 App.js,并且仅在需要时通过从 React-Native 包导入 {Platform} 来更改部分平台特定代码。
开发者文档 https://facebook.github.io/react-native/docs/getting-started.html#modifying-your-app
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)