安装

安装

简介

大多数项目都从模板开始。让我们使用 React Router 维护的一个基本模板

npx create-react-router@latest my-react-router-app

现在进入新目录并启动应用程序

cd my-react-router-app
npm i
npm run dev

您现在可以在浏览器中打开 https://:5173

您可以在 GitHub 上查看模板,了解如何手动设置项目。

我们还有许多可随时部署的模板,供您入门使用。

npx create-react-router@latest --template remix-run/react-router-templates/<template-name>

下一步: 路由

文档和示例 CC 4.0
编辑