You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

React Native 0.72:如何用react-native init创建JavaScript项目

在React Native 0.72中创建JavaScript项目的方法

React Native 0.72及以上版本默认生成TypeScript项目,若要通过react-native init命令直接创建JavaScript项目,只需在命令中指定官方JavaScript模板即可:

npx react-native init AwesomeProject --template react-native-template-javascript

执行该命令后,生成的项目会完全基于JavaScript,包含.js入口文件、适配JS的Babel配置等,与0.72版本之前默认生成的JS项目结构一致。

内容的提问来源于stack exchange,提问作者Kaan Ateşel

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.16 19:54:50