You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you have constraints that are not served well by a [Framework](/architecture/glossary#react-native-framework), or you prefer to write your own Framework, you can create a React Native app without using a Framework.
To do so, you'll first need to [set up your environment](set-up-your-environment). Once you're set up, continue with the steps below to create an application and start developing.
You can use [React Native Community CLI](https://github.com/react-native-community/cli)to generate a new project. Let's create a new React Native project called "AwesomeProject":
24
+
你可以使用 [React Native Community CLI](https://github.com/react-native-community/cli)来生成新项目。让我们创建一个名为 "AwesomeProject" 的 React Native 项目:
This is not necessary if you are integrating React Native into an existing application, or if you've installed [Expo](https://docs.expo.dev/bare/installing-expo-modules/) in your project, or if you're adding Android support to an existing React Native project (see [Integration with Existing Apps](integration-with-existing-apps.md)). You can also use a third-party CLI to set up your React Native app, such as [Ignite CLI](https://github.com/infinitered/ignite).
You can also start a project with a custom React Native template with the `--template`argument, read more [here](https://github.com/react-native-community/cli/blob/main/docs/init.md#initializing-project-with-custom-template).
[**Metro**](https://metrobundler.dev/)is the JavaScript build tool for React Native. To start the Metro development server, run the following from your project folder:
54
+
[**Metro**](https://metrobundler.dev/)是 React Native 的 JavaScript 构建工具。要启动 Metro 开发服务器,请在项目目录中执行以下命令:
If you're familiar with web development, Metro is similar to bundlers such as Vite and webpack, but is designed end-to-end for React Native. For instance, Metro uses[Babel](https://babel.dev/)to transform syntax such as JSX into executable JavaScript.
74
+
如果你熟悉 Web 开发,Metro 类似于 Vite 和 webpack 等打包工具,但它是专为 React Native 端到端设计的。例如,Metro 使用[Babel](https://babel.dev/)将 JSX 等语法转换为可执行的 JavaScript。
75
75
:::
76
76
77
-
### Step 3: Start your application
77
+
### 第 3 步:启动应用
78
78
79
-
Let Metro Bundler run in its own terminal. Open a new terminal inside your React Native project folder. Run the following:
79
+
让 Metro Bundler 在自己的终端窗口中继续运行。在 React Native 项目目录下打开一个新的终端,然后执行以下命令:
0 commit comments