Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions .github/workflows/discord_notify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,18 @@ name: Discord Notify

on:
pull_request_target:
types: [ labeled ]
types: [labeled]

jobs:
check_maintainer:
uses: facebook/react/.github/workflows/shared_check_maintainer.yml@main
with:
actor: ${{ github.event.pull_request.user.login }}
is_remote: true

notify:
if: ${{ github.event.label.name == 'React Core Team' }}
if: ${{ needs.check_maintainer.outputs.is_core_team == 'true' }}
needs: check_maintainer
runs-on: ubuntu-latest
steps:
- name: Discord Webhook Action
Expand All @@ -18,4 +25,4 @@ jobs:
embed-author-icon-url: ${{ github.event.pull_request.user.avatar_url }}
embed-title: '#${{ github.event.number }} (+${{github.event.pull_request.additions}} -${{github.event.pull_request.deletions}}): ${{ github.event.pull_request.title }}'
embed-description: ${{ github.event.pull_request.body }}
embed-url: ${{ github.event.pull_request.html_url }}
embed-url: ${{ github.event.pull_request.html_url }}
32 changes: 32 additions & 0 deletions .github/workflows/label_core_team_prs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Label Core Team PRs

on:
pull_request_target:

env:
TZ: /usr/share/zoneinfo/America/Los_Angeles
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#cache-segment-restore-timeout
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1

jobs:
check_maintainer:
uses: facebook/react/.github/workflows/shared_check_maintainer.yml@main
with:
actor: ${{ github.event.pull_request.user.login }}
is_remote: true

label:
if: ${{ needs.check_maintainer.outputs.is_core_team == 'true' }}
runs-on: ubuntu-latest
needs: check_maintainer
steps:
- name: Label PR as React Core Team
uses: actions/github-script@v7
with:
script: |
github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: ${{ github.event.number }},
labels: ['React Core Team']
});
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
},
"dependencies": {
"@codesandbox/sandpack-react": "2.13.5",
"@docsearch/css": "^3.6.1",
"@docsearch/react": "^3.6.1",
"@docsearch/css": "^3.8.3",
"@docsearch/react": "^3.8.3",
"@headlessui/react": "^1.7.0",
"@radix-ui/react-context-menu": "^2.1.5",
"body-scroll-lock": "^3.1.3",
Expand Down
Binary file removed public/images/team/andrey-lunyov.jpg
Binary file not shown.
Binary file added public/images/team/hendrik.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/team/jordan.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/images/team/kathryn-middleton.jpg
Binary file not shown.
Binary file modified public/images/team/lauren.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/images/team/luna-wei.jpg
Binary file not shown.
Binary file added public/images/team/mike.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/images/team/noahlemen.jpg
Binary file not shown.
Binary file added public/images/team/pieter.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/images/team/sam.jpg
Binary file not shown.
Binary file removed public/images/team/sathya.jpg
Binary file not shown.
Binary file removed public/images/team/tianyu.jpg
Binary file not shown.
2 changes: 1 addition & 1 deletion src/components/MDX/TeamMember.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/

import * as React from 'react';
import Image from 'next/image';
import Image from 'next/legacy/image';
import {IconTwitter} from '../Icon/IconTwitter';
import {IconThreads} from '../Icon/IconThreads';
import {IconBsky} from '../Icon/IconBsky';
Expand Down
5 changes: 4 additions & 1 deletion src/content/community/acknowledgements.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ React 最初由 [Jordan Walke](https://github.com/jordwalke) 创立。如今 Rea
* [Joe Critchley](https://github.com/joecritch)
* [Jeff Morrison](https://github.com/jeffmo)
* [Luna Ruan](https://github.com/lunaruan)
* [Luna Wei](https://github.com/lunaleaps)
* [Noah Lemen](https://github.com/noahlemen)
* [Kathryn Middleton](https://github.com/kmiddleton14)
* [Keyan Zhang](https://github.com/keyz)
* [Marco Salazar](https://github.com/salazarm)
Expand All @@ -51,9 +53,10 @@ React 最初由 [Jordan Walke](https://github.com/jordwalke) 创立。如今 Rea
* [Samuel Susla](https://github.com/sammy-SC)
* [Sander Spies](https://github.com/sanderspies)
* [Sasha Aickin](https://github.com/aickin)
* [Sean Keegan](https://github.com/seanryankeegan)
* [Sathya Gunasekaran](https://github.com/gsathya)
* [Sophia Shoemaker](https://github.com/mrscobbler)
* [Sunil Pai](https://github.com/threepointone)
* [Tianyu Yao](https://github.com/)
* [Tim Yung](https://github.com/yungsters)
* [Xuan Huang](https://github.com/huxpro)

Expand Down
30 changes: 15 additions & 15 deletions src/content/community/team.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,14 @@ React 核心团队成员全职致力于核心组件 API 的开发,负责 React
Dan 在意外发现 Microsoft PowerPoint 内部的 Visual Basic 后进入了编程行业。他发现了自己的真正使命,就是将 [Sebastian](#sebastian-markbåge) 的推特转化为长篇博客文章。Dan 偶尔会通过整局游戏都躲在草丛里的方式,在《堡垒之夜》中赢得胜利。
</TeamMember>

<TeamMember name="Eli White" permalink="eli-white" photo="/images/team/eli-white.jpg" github="TheSavior" twitter="Eli_White" threads="elicwhite" title="Engineering Manager at Meta">
<TeamMember name="Eli White" permalink="eli-white" photo="/images/team/eli-white.jpg" github="elicwhite" twitter="Eli_White" threads="elicwhite" title="Engineering Manager at Meta">
Eli 因为在中学时期的黑客行为被学校暂时开除,从此踏入了编程的世界。自 2017 年起,他就一直致力于 React 和 React Native 的工作。他是个美食爱好者,特别喜欢冰淇淋和苹果派。你常常能发现 Eli 在尝试一些别出心裁的活动,如跑酷、室内跳伞,以及空中丝绸表演。
</TeamMember>

<TeamMember name="Hendrik Liebau" permalink="hendrik-liebau" photo="/images/team/hendrik.jpg" github="unstubbable" bsky="unstubbable.bsky.social" twitter="unstubbable" title="Engineer at Vercel">
Hendrik’s journey in tech started in the late 90s when he built his first websites with Netscape Communicator. After earning a diploma in computer science and working at digital agencies, he built a React Server Components bundler and library, paving the way to his role on the Next.js team. Outside of work, he enjoys cycling and tinkering in his workshop.
</TeamMember>

<TeamMember name="Jack Pope" permalink="jack-pope" photo="/images/team/jack-pope.jpg" github="jackpope" personal="jackpope.me" title="Engineer at Meta">
Shortly after being introduced to AutoHotkey, Jack had written scripts to automate everything he could think of. When reaching limitations there, he dove headfirst into web app development and hasn't looked back. Most recently, Jack worked on the web platform at Instagram before moving to React. His favorite programming language is JSX.
</TeamMember>
Expand All @@ -38,6 +42,10 @@ React 核心团队成员全职致力于核心组件 API 的开发,负责 React
Joe 原计划专攻数学和哲学,然而在用 Matlab 编写物理模拟后,他转行投入了计算机科学领域。在投身 React 之前,他曾先后在 Relay、RSocket.js 以及 Skip 编程语言上有过工作经验。闲暇之余,乔喜欢跑步、学习日语,还有陪伴家人。
</TeamMember>

<TeamMember name="Jordan Brown" permalink="jordan-brown" photo="/images/team/jordan.jpg" github="jbrown215" title="Engineer at Meta">
Jordan started coding by building iPhone apps, where he was pushing and popping view controllers before he knew that for-loops were a thing. He enjoys working on technology that developers love, which naturally drew him to React. Outside of work he enjoys reading, kiteboarding, and playing guitar.
</TeamMember>

<TeamMember name="Josh Story" permalink="josh-story" photo="/images/team/josh.jpg" github="gnoff" bsky="storyhb.com" title="Engineer at Vercel">
Josh 大学主修数学,并在那时期初次接触到编程。他的职业生涯起步于在 Microsoft Excel 上编程进行保险费率计算,这是反应式编程的典型案例,或许也是他后来投身 React 的原因。此后,Josh 在数家创业公司中担任过独立贡献者、经理甚至高级管理者。工作之外,他享受烹饪的挑战。
</TeamMember>
Expand All @@ -46,20 +54,20 @@ React 核心团队成员全职致力于核心组件 API 的开发,负责 React
Lauren's programming career peaked when she first discovered the `<marquee>` tag. She’s been chasing that high ever since. She studied Finance instead of CS in college, so she learned to code using Excel. Lauren enjoys dropping cheeky memes in chat, playing video games with her partner, learning Korean, and petting her dog Zelda.
</TeamMember>

<TeamMember name="Luna Wei" permalink="luna-wei" photo="/images/team/luna-wei.jpg" github="lunaleaps" twitter="lunaleaps" threads="lunaleaps" title="Engineer at Meta">
Luna first learnt the fundamentals of python at the age of 6 from her father. Since then, she has been unstoppable. Luna aspires to be a gen z, and the road to success is paved with environmental advocacy, urban gardening and lots of quality time with her Voo-Doo’d (as pictured).
</TeamMember>

<TeamMember name="Matt Carroll" permalink="matt-carroll" photo="/images/team/matt-carroll.png" github="mattcarrollcode" twitter="mattcarrollcode" threads="mattcarrollcode" title="Developer Advocate at Meta">
Matt 偶然地踏入了编程领域,并从那时起就对于在社区中创造一些个人无法独立完成的事物产生了浓厚兴趣。在加入 React 之前,他在 YouTube、Google Assistant、Fuchsia、Google Cloud AI 以及 Evernote 有过工作经验。在他不忙于创造更好的开发工具时,他喜欢享受山区的美景,欣赏爵士乐,以及陪伴他的家人。
</TeamMember>

<TeamMember name="Mike Vitousek" permalink="mike-vitousek" photo="/images/team/mike.jpg" github="mvitousek" title="Engineer at Meta">
Mike went to grad school dreaming of becoming a professor but realized that he liked building things a lot more than writing grant applications. Mike joined Meta to work on Javascript infrastructure, which ultimately led him to work on the React Compiler. When not hacking on either Javascript or OCaml, Mike can often be found hiking or skiing in the Pacific Northwest.
</TeamMember>

<TeamMember name="Mofei Zhang" permalink="mofei-zhang" photo="/images/team/mofei-zhang.png" github="mofeiZ" threads="z_mofei" title="Engineer at Meta">
Mofei 在意识到编程可以帮她在视频游戏中作弊时开始了编程生涯。她在本科和研究生期间专注于操作系统的研究,但现在她发现自己非常享受在 React 上的编程工作。在工作之外,她喜欢解决攀岩中遇到的问题,并且正在计划她的下一次背包旅行。
</TeamMember>

<TeamMember name="Noah Lemen" permalink="noah-lemen" photo="/images/team/noahlemen.jpg" github="noahlemen" twitter="noahlemen" threads="noahlemen" personal="noahle.men" title="Engineer at Meta">
Noah 在纽约大学接受音乐技术教育期间,对 UI 编程产生了兴趣。在 Meta,他从事内部工具、浏览器、网络性能方面的工作,目前专注于 React。在工作之余,他会捣鼓合成器,或者和他的猫在一起玩耍。
<TeamMember name="Pieter Vanderwerff" permalink="pieter-vanderwerff" photo="/images/team/pieter.jpg" github="pieterv" threads="pietervanderwerff" title="Engineer at Meta">
Pieter studied building science but after failing to get a job he made himself a website and things escalated from there. At Meta, he enjoys working on performance, languages and now React. When he's not programming you can find him off-road in the mountains.
</TeamMember>

<TeamMember name="Rick Hanlon" permalink="rick-hanlon" photo="/images/team/rickhanlonii.jpg" github="rickhanlonii" twitter="rickhanlonii" threads="rickhanlonii" bsky="ricky.fm" title="Engineer at Meta">
Expand All @@ -70,10 +78,6 @@ React 核心团队成员全职致力于核心组件 API 的开发,负责 React
Ruslan's introduction to UI programming started when he was a kid by manually editing HTML templates for his custom gaming forums. Somehow, he ended up majoring in Computer Science. He enjoys music, games, and memes. Mostly memes.
</TeamMember>

<TeamMember name="Sathya Gunasekaran " permalink="sathya-gunasekaran" photo="/images/team/sathya.jpg" github="gsathya" twitter="_gsathya" threads="gsathya.03" title="Engineer at Meta">
尽管 Sathya 在学校时对《龙书》并无好感,但奇妙的是,他的整个职业生涯都与编译器紧密相连。当他不忙于编译 React 组件的时候,他可能正品尝一杯咖啡,或者正在享受又一份美味的 Dosa。
</TeamMember>

<TeamMember name="Sebastian Markbåge" permalink="sebastian-markbåge" photo="/images/team/sebmarkbage.jpg" github="sebmarkbage" twitter="sebmarkbage" threads="sebmarkbage" title="Engineer at Vercel">
Sebastian 主修心理学。他通常比较沉默寡言。即使他说些什么,我们其他人通常也要等几个月后才能理解他的意思。他的姓氏正确的发音是“mark-boa-geh”,但出于实用考虑,他接受了“mark-beige”的发音——这也是他处理 React 问题的方式。
</TeamMember>
Expand All @@ -90,10 +94,6 @@ React 核心团队成员全职致力于核心组件 API 的开发,负责 React
在 React 刚刚发布的四天后,Sophie 就将她当时的整个项目全部改写成了使用 React,现在回想起来,她认为这可能有些鲁莽。但在成为该项目的最大贡献者之后,她开始思考为何自己没有像其他人那样从 Facebook 那里得到报酬。于是,她正式加入了 Facebook 的团队,带领 React 度过了它的青少年时期。虽然她在几年前已经离开了那个职位,但她仍然是团队群聊的一员,继续“提供价值”。
</TeamMember>

<TeamMember name="Tianyu Yao" permalink="tianyu-yao" photo="/images/team/tianyu.jpg" github="tyao1" twitter="tianyu0" title="Engineer at Meta">
Tianyu 对计算机的兴趣源自他对视频游戏的热爱,这使得他选择了计算机科学作为自己的专业,至今他依然热衷于一些看似孩子气的游戏,如《英雄联盟》。当他不在电脑前时,他喜欢和他的两只小猫一起玩耍,或者去徒步旅行和划皮艇。
</TeamMember>

<TeamMember name="Yuzhi Zheng" permalink="yuzhi-zheng" photo="/images/team/yuzhi.jpg" github="yuzhi" twitter="yuzhiz" threads="yuzhiz" title="Engineering Manager at Meta">
Yuzhi 在学校期间学习的是计算机科学。她喜欢看到自己的代码能在无需实验室的情况下就能实现效果,这给她带来了即时的满足感。现在,她是 React 组织的一名经理。在成为经理之前,她曾在 Relay 数据获取框架上有过工作经历。在业余时间,Yuzhi 享受通过园艺和家居改善项目来优化自己的生活。
</TeamMember>
Expand Down
4 changes: 2 additions & 2 deletions src/content/reference/react-dom/static/prerender.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ async function renderToString() {
bootstrapScripts: ['/main.js']
});

const reader = stream.getReader();
const reader = prelude.getReader();
let content = '';
while (true) {
const {done, value} = await reader.read();
Expand Down Expand Up @@ -291,7 +291,7 @@ Suspense-enabled data fetching without the use of an opinionated framework is no

### My stream doesn't start until the entire app is rendered {/*my-stream-doesnt-start-until-the-entire-app-is-rendered*/}

The `prerender` response waits for the entire app to finish rendering, including waiting for all suspense boundaries to resolve, before resolving. It is designed for static site generation (SSG) ahead of time and does not support streaming more content as it loads.
The `prerender` response waits for the entire app to finish rendering, including waiting for all Suspense boundaries to resolve, before resolving. It is designed for static site generation (SSG) ahead of time and does not support streaming more content as it loads.

To stream content as it loads, use a streaming server render API like [renderToReadableStream](/reference/react-dom/server/renderToReadableStream).

Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ Suspense-enabled data fetching without the use of an opinionated framework is no

### My stream doesn't start until the entire app is rendered {/*my-stream-doesnt-start-until-the-entire-app-is-rendered*/}

The `prerenderToNodeStream` response waits for the entire app to finish rendering, including waiting for all suspense boundaries to resolve, before resolving. It is designed for static site generation (SSG) ahead of time and does not support streaming more content as it loads.
The `prerenderToNodeStream` response waits for the entire app to finish rendering, including waiting for all Suspense boundaries to resolve, before resolving. It is designed for static site generation (SSG) ahead of time and does not support streaming more content as it loads.

To stream content as it loads, use a streaming server render API like [renderToPipeableStream](/reference/react-dom/server/renderToPipeableStream).

4 changes: 2 additions & 2 deletions src/content/reference/react/useActionState.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ form state 是一个只在表单被提交触发 action 后才会被更新的值
`useActionState` 返回一个包含以下值的数组:

1. 当前的 state。第一次渲染期间,该值为传入的 `initialState` 参数值。在 action 被调用后该值会变为 action 的返回值。
2. 一个新的 action 函数用于在你的 `form` 组件的 `action` 参数或表单中任意一个 `button` 组件的 `formAction` 参数中传递。
2. 一个新的 action 函数用于在你的 `form` 组件的 `action` 参数或表单中任意一个 `button` 组件的 `formAction` 参数中传递。这个 action 也可以手动在 [`startTransition`](/reference/react/startTransition) 中调用。
3. 一个 `isPending` 标识,用于表明是否有正在 pending 的 Transition。

#### 注意 {/*caveats*/}
Expand Down Expand Up @@ -102,7 +102,7 @@ function MyComponent() {
`useActionState` 返回一个包含以下值的数组:

1. 该表单的 <CodeStep step={1}>当前 state</CodeStep>,初始值为提供的 <CodeStep step={4}>初始 state</CodeStep>,当表单被提交后则改为传入的 <CodeStep step={3}>action</CodeStep> 的返回值。
2. 传入 `<form>` 标签的 `action` 属性的 <CodeStep step={2}>新 action</CodeStep>。
2. 传入 `<form>` 标签的 `action` 属性的 <CodeStep step={2}>新 action</CodeStep>,或者手动在 `startTransition` 中调用它
3. 一个 <CodeStep step={1}>pending state</CodeStep>,可以在处理 action 的过程中使用它。

表单被提交后,传入的 <CodeStep step={3}>action</CodeStep> 函数会被执行。返回值将会作为该表单的新的 <CodeStep step={1}>当前 state</CodeStep>。
Expand Down
4 changes: 2 additions & 2 deletions src/content/reference/react/useEffect.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ useEffect(setup, dependencies?)
在组件的顶层调用 `useEffect` 来声明一个 Effect:

```js
import { useEffect } from 'react';
import { useState, useEffect } from 'react';
import { createConnection } from './chat.js';

function ChatRoom({ roomId }) {
Expand Down Expand Up @@ -81,7 +81,7 @@ function ChatRoom({ roomId }) {
要 [将组件连接到某个外部系统](/learn/synchronizing-with-effects),请在组件的顶层调用 `useEffect`:

```js [[1, 8, "const connection = createConnection(serverUrl, roomId);"], [1, 9, "connection.connect();"], [2, 11, "connection.disconnect();"], [3, 13, "[serverUrl, roomId]"]]
import { useEffect } from 'react';
import { useState, useEffect } from 'react';
import { createConnection } from './chat.js';

function ChatRoom({ roomId }) {
Expand Down
Loading
Loading