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're starting a new project, we recommend to use a toolchain or a framework. These tools provide a comfortable development environment but require a local Node.js installation.
*How to start a project with a fully-featured framework
16
-
*What's inside popular toolchains and frameworks
16
+
*工具链与框架有何不同
17
+
*如何用极简的工具链启动一个项目
18
+
*如何用功能齐全的框架启动一个项目
19
+
*流行的工具链和框架有哪些
17
20
18
21
</YouWillLearn>
19
22
20
-
## Choose your own adventure {/*choose-your-own-adventure*/}
23
+
## 选择适合你的方案 {/*choose-your-own-adventure*/}
21
24
22
-
React is a library that lets you organize UI code by breaking it apart into pieces called components. React doesn't take care of routing or data management. This means there are several ways to start a new React project:
If you're **learning React,** we recommend [Create React App](https://create-react-app.dev/). It is the most popular way to try out React and build a new single-page, client-side application. It's made for React but isn't opinionated about routing or data fetching.
> Create React App doesn't handle backend logic or databases. You can use it with any backend. When you build a project, you'll get a folder with static HTML, CSS and JS. Because Create React App can't take advantage of the server, it doesn't provide the best performance. If you're looking for faster loading times and built-in features like routing and server-side logic, we recommend using a framework instead.
If you're looking to **start a production-ready project,**[Next.js](https://nextjs.org/)is a great place to start. Next.js is a popular, lightweight framework for static and server‑rendered applications built with React. It comes pre-packaged with features like routing, styling, and server-side rendering, getting your project up and running quickly.
### Popular alternatives {/*popular-alternatives*/}
67
+
### 主流备选方案 {/*popular-alternatives*/}
65
68
66
69
*[Gatsby](https://www.gatsbyjs.org/)
67
70
*[Remix](https://remix.run/)
68
71
*[Razzle](https://razzlejs.org/)
69
72
70
-
## Custom toolchains {/*custom-toolchains*/}
73
+
## 自定义工具链 {/*custom-toolchains*/}
71
74
72
-
You may prefer to create and configure your own toolchain. A toolchain typically consists of:
75
+
你可能喜欢创建和配置你自己的工具链,一个工具链通常由以下部分组成:
73
76
74
-
* A **package manager** lets you install, update, and manage third-party packages. Popular package managers: [npm](https://www.npmjs.com/) (built into Node.js), [Yarn](https://yarnpkg.com/), [pnpm](https://pnpm.io/).
75
-
* A **compiler** lets you compile modern language features and additional syntax like JSX or type annotations for the browsers. Popular compilers: [Babel](https://babeljs.io/), [TypeScript](http://typescript.org/), [swc](https://swc.rs/).
76
-
* A **bundler** lets you write modular code and bundle it together into small packages to optimize load time. Popular bundlers: [webpack](https://webpack.js.org/), [Parcel](https://parceljs.org/), [esbuild](https://esbuild.github.io/), [swc](https://swc.rs/).
77
-
* A **minifier** makes your code more compact so that it loads faster. Popular minifiers: [Terser](https://terser.org/), [swc](https://swc.rs/).
78
-
* A **server** handles server requests so that you can render components to HTML. Popular servers: [Express](https://expressjs.com/).
79
-
* A **linter** checks your code for common mistakes. Popular linters: [ESLint](https://eslint.org/).
80
-
* A **test runner** lets you run tests against your code. Popular test runners: [Jest](https://jestjs.io/).
81
-
82
-
If you prefer to set up your own JavaScript toolchain from scratch, [check out this guide](https://blog.usejournal.com/creating-a-react-app-from-scratch-f3c693b84658) that re-creates some of the Create React App functionality. A framework will usually also provide a routing and a data fetching solution. In a larger project, you might also want to manage multiple packages in a single repository with a tool like [Nx](https://nx.dev/react).
0 commit comments