diff --git a/src/components/Layout/Footer.tsx b/src/components/Layout/Footer.tsx index 677899eecd..c89b0e3888 100644 --- a/src/components/Layout/Footer.tsx +++ b/src/components/Layout/Footer.tsx @@ -286,50 +286,44 @@ export function Footer() {
- Learn React + 学习 React - Quick Start - Installation - - Describing the UI - - - Adding Interactivity - - Managing State - Escape Hatches + 快速入门 + 安装 + 描述 UI + 添加交互 + 状态管理 + 应急方案
- API Reference + API 参考 - React APIs - React DOM APIs + React API + React DOM API
- Community + 社区 - Code of Conduct + 行为准则 - Meet the Team + 团队 - Docs Contributors - - - Acknowledgements + 文档贡献者 + 鸣谢
- More - Blog + 了解更多 + 博客 React Native - Privacy + 隐私政策 - Terms + 条款

- The library for web and native user interfaces + 用于构建 Web 和原生交互界面的库

- Learn React + 学习 React - API Reference + API 参考
-
Create user interfaces from components
+
用组件创建用户界面
- React lets you build user interfaces out of individual pieces - called components. Create your own React components like{' '} - Thumbnail, LikeButton, and{' '} - Video. Then combine them into entire screens, pages, - and apps. + React 让你可以通过组件来构建用户界面。你可以创建像{' '} + ThumbnailLikeButton 和{' '} + Video 这样的组件。然后将它们组合成整个应用程序。
@@ -169,22 +167,21 @@ export function HomeContent() {
- Whether you work on your own or with thousands of other - developers, using React feels the same. It is designed to let you - seamlessly combine components written by independent people, - teams, and organizations. + 无论你是独自工作还是与成千上万的其他开发人员合作,使用 React + 的感觉都是相同的。它旨在让你轻松地组合由独立个人、团队或组织编写的组件。
-
Write components with code and markup
+
用代码和标签编写组件
- React components are JavaScript functions. Want to show some - content conditionally? Use an if statement. - Displaying a list? Try array map(). Learning React is - learning programming. + React 组件是 JavaScript 函数。想要有条件地显示一些内容吗?使用{' '} + if 语句。 +
+ 想要展示一个列表?尝试使用数组的 map() 方法。学习 + React 就是学习编程。
@@ -192,22 +189,20 @@ export function HomeContent() {
- This markup syntax is called JSX. It is a JavaScript syntax - extension popularized by React. Putting JSX markup close to - related rendering logic makes React components easy to create, - maintain, and delete. + 这种标签语法称为 JSX。它是由 React 推广的 JavaScript 语法扩展。将 + JSX 标签与相关的渲染逻辑放在一起,使得创建、维护和删除 React + 组件变得容易。
-
Add interactivity wherever you need it
+
在任何地方添加交互
- React components receive data and return what should appear on the - screen. You can pass them new data in response to an interaction, - like when the user types into an input. React will then update the - screen to match the new data. + React + 组件接收数据并返回应该出现在屏幕上的内容。你可以通过响应交互(例如用户输入)向它们传递新数据。然后,React + 将更新屏幕以匹配新数据。
@@ -215,16 +210,15 @@ export function HomeContent() {
- You don’t have to build your whole page in React. Add React to - your existing HTML page, and render interactive React components - anywhere on it. + 你也可以不用 React 去构建整个页面,而只是将 React 添加到现有的 + HTML 页面中,在任何地方呈现交互式的 React 组件。
- Add React to your page + 将 React 添加到你已有的页面中
@@ -233,15 +227,17 @@ export function HomeContent() {
- Go full-stack
- with a framework + 使用框架 +
+ 进行全栈开发
- React is a library. It lets you put components together, but it - doesn’t prescribe how to do routing and data fetching. To build an - entire app with React, we recommend a full-stack React framework - like Next.js or{' '} - Remix. + React + 是一个库。它允许你将组件放在一起,但不关注路由和数据获取。要使用 + React 构建整个应用程序,我们建议使用像{' '} + Next.js 或{' '} + Remix 这样的全栈 React + 框架。
@@ -249,17 +245,15 @@ export function HomeContent() {
- React is also an architecture. Frameworks that implement it let - you fetch data in asynchronous components that run on the server - or even during the build. Read data from a file or a database, and - pass it down to your interactive components. + React + 也是一种架构。实现它的框架可以在服务端甚至是构建阶段使用异步组件来获取数据,也可以从文件或数据库读取数据,并将其传递给交互式组件。
- Get started with a framework + 使用框架开始一个新项目
@@ -267,12 +261,11 @@ export function HomeContent() {
-
Use the best from every platform
+
博采众长
- People love web and native apps for different reasons. React - lets you build both web apps and native apps using the same - skills. It leans upon each platform’s unique strengths to let - your interfaces feel just right on every platform. + 人们因为不同的原因偏好 Web 应用或原生应用。React + 让你使用相同的技能构建 Web + 应用程序和原生应用程序。它依赖于每个平台独特的优势,使你的界面就像原生一样。
@@ -286,15 +279,14 @@ export function HomeContent() {

- Stay true to the web + 不忘初心

- People expect web app pages to load fast. On the server, - React lets you start streaming HTML while you’re still - fetching data, progressively filling in the remaining - content before any JavaScript code loads. On the client, - React can use standard web APIs to keep your UI - responsive even in the middle of rendering. + 人们期望网页加载速度更快。在服务器上,React + 可以让你在获取数据的同时开始流式传输 HTML,在任何 + JavaScript + 代码加载之前逐步填充剩余内容。在客户端,即使是在渲染过程中,React + 可以使用标准的 Web API 使 UI 能够快速响应。

@@ -372,21 +364,19 @@ export function HomeContent() {

- Go truly native + 开发真正的原生应用

- People expect native apps to look and feel like their - platform.{' '} + 人们希望原生应用程序都有和自己使用的平台相一致的体验。 React Native {' '} - and{' '} + 和{' '} Expo{' '} - let you build apps in React for Android, iOS, and - more. They look and feel native because their UIs{' '} - are truly native. It’s not a web view—your - React components render real Android and iOS views - provided by the platform. + 让你可以使用 React 构建 Android、iOS + 等应用程序。它们的样式和体验都和原生应用程序一样,因为它们的用户界面是真正的原生用户界面。这不是一个 + Web 视图——你的 React 组件由平台提供的真实 Android 或 + iOS 视图来渲染。

@@ -396,14 +386,12 @@ export function HomeContent() {
- With React, you can be a web and a native developer. Your - team can ship to many platforms without sacrificing the user - experience. Your organization can bridge the platform silos, and - form teams that own entire features end-to-end. + 使用 React,你可以成为 Web 和原生应用的开发人员。 + 你的团队可以在不牺牲用户体验的情况下发布到各个平台。你的组织可以忽略平台差异,并拥有端到端的全部功能。
- Build for native platforms + 为原生平台构建
@@ -414,23 +402,22 @@ export function HomeContent() {
-
Upgrade when the future is ready
+
充分测试,安心升级
- React approaches changes with care. Every React commit is - tested on business-critical surfaces with over a billion - users. Over 100,000 React components at Meta help validate - every migration strategy. + React 非常谨慎地处理每个改动。每个 React + 提交都在拥有超过十亿用户的关键业务页面上进行测试。Meta 的 10 + 万个 React 组件帮助验证每种迁移策略。
- The React team is always researching how to improve React. - Some research takes years to pay off. React has a high bar - for taking a research idea into production. Only proven - approaches become a part of React. + React 团队始终在研究如何改进 + React。一些研究需要数年才能得到回报。React + 对将研究想法转化为生产具有高标准要求,只有经过证明的方法才能成为 + React 的一部分。
- Read more React news + 阅读更多 React 新闻
@@ -438,7 +425,7 @@ export function HomeContent() {

- Latest React News + 最新 React 新闻

@@ -456,7 +443,7 @@ export function HomeContent() {
- Read more React news + 阅读更多 React 新闻
@@ -468,14 +455,10 @@ export function HomeContent() {
-
- Join a community
- of millions -
+
加入数百万人的社区
- You’re not alone. Two million developers from all over the - world visit the React docs every month. React is something - that people and teams can agree on. + 你并不孤单。每个月有来自世界各地的两百万开发者访问 React + 文档。React 可以让人们达成共识。
@@ -483,13 +466,10 @@ export function HomeContent() {
- This is why React is more than a library, an architecture, or - even an ecosystem. React is a community. It’s a place where - you can ask for help, find opportunities, and meet new - friends. You will meet both developers and designers, - beginners and experts, researchers and artists, teachers and - students. Our backgrounds may be very different, but React - lets us all create user interfaces together. + 这就是为什么 React + 不仅仅是一个库、一种架构,甚至不只是一个生态系统。React + 是一个社区。在这里你可以寻求帮助,发现机会并结交新朋友。你将会遇到开发者和设计师、初学者和专家、研究人员和艺术家、教师和学生等各行各业的人士。我们的背景可能非常不同,但 + React 让我们所有人都能够共同创建用户界面。
@@ -498,15 +478,16 @@ export function HomeContent() {
- Welcome to the
- React community + 欢迎来到 +
+ React 社区
- Get Started + 开始 React 之旅
diff --git a/src/components/Layout/TopNav/TopNav.tsx b/src/components/Layout/TopNav/TopNav.tsx index 663801fd1c..7c31723aa3 100644 --- a/src/components/Layout/TopNav/TopNav.tsx +++ b/src/components/Layout/TopNav/TopNav.tsx @@ -231,18 +231,18 @@ export default function TopNav({
- Learn + 教程 - Reference + 参考 - Community + 社区 - Blog + 博客
@@ -304,20 +304,20 @@ export default function TopNav({
- Learn + 教程 - Reference + 参考 - Community + 社区 - Blog + 博客