Skip to content

Sync with react.dev @ a5aad0d5 #494

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
b1a249d
Fix React Native DevTools link (#7386)
rammba Dec 24, 2024
5e3e400
bot to notify for PRs (#7408)
rickhanlonii Jan 7, 2025
c0b6baf
Fix broken Next.js base path configuration link (#7419)
amarachiugwu Jan 9, 2025
7b4f948
fix: change overflow-x-scroll to overflow-x-auto in TerminalBlock com…
hichemfantar Jan 9, 2025
9c4bc28
Update server-functions.md (#7396)
Azzyxec Jan 9, 2025
9000e6e
Add React Universe Conf 2025 to list of conferences (#7421)
barbaramarkiewicz Jan 9, 2025
517c0fa
/errors: Empty args are not missing arguments (#6767)
eps1lon Jan 13, 2025
855ce23
Upgrade to React 19, Next 15.1 and enable React Compiler (#6996)
mattcarrollcode Jan 13, 2025
316230a
Update React compiler and install eslint plugin (#7428)
poteto Jan 13, 2025
ee8a829
Disallow `/index.html` in sandboxes (#7430)
eps1lon Jan 14, 2025
a2d4932
Update Conferences Lists for 2025 (#7406)
apherio Jan 15, 2025
b22cbc3
Update Dan Abramov's broken Twitter link to bsky.app across multiple …
hichemfantar Jan 15, 2025
ee361b5
Update React Paris conference year to 2025 (#7439)
mikedidomizio Jan 21, 2025
e88e3d0
React Native Connection is back in 2025 (#7311)
viteinfinite Jan 21, 2025
b03017a
fix typo (#7440)
slavgetov Jan 21, 2025
c140d2c
Update conferences.md for CityJS Athens and London Events (#7425)
arismarko Jan 22, 2025
7cdbed0
Mention startTransition in useActionState docs (#7448)
sophiebits Jan 24, 2025
07f13ab
[ci] Add workflow to label PRs from core team (#7451)
poteto Jan 24, 2025
2f24839
[ci] Specify is_remote input to maintainer check workflow (#7453)
poteto Jan 24, 2025
a5aad0d
[ci] Update discord notification bot to use remote workflow (#7455)
poteto Jan 24, 2025
901f211
merging all conflicts
react-translations-bot Jan 27, 2025
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
21 changes: 20 additions & 1 deletion .github/workflows/discord_notify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,26 @@ name: Discord Notify

on:
pull_request_target:
<<<<<<< HEAD
types: [ labeled ]

jobs:
notify:
if: ${{ github.event.label.name == 'React Core Team' }}
=======
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: ${{ needs.check_maintainer.outputs.is_core_team == 'true' }}
needs: check_maintainer
>>>>>>> a5aad0d5e92872ef715b462b1dd6dcbeb45cf781
runs-on: ubuntu-latest
steps:
- name: Discord Webhook Action
Expand All @@ -18,4 +33,8 @@ 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 }}
<<<<<<< HEAD
embed-url: ${{ github.event.pull_request.html_url }}
=======
embed-url: ${{ github.event.pull_request.html_url }}
>>>>>>> a5aad0d5e92872ef715b462b1dd6dcbeb45cf781
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']
});
21 changes: 21 additions & 0 deletions src/content/community/conferences.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,36 @@ Do you know of a local React.js conference? Add it here! (Please keep the list c
## Upcoming Conferences {/*upcoming-conferences*/}

### React Paris 2025 {/*react-paris-2025*/}
<<<<<<< HEAD
March 20 - 21, 2024. In-person in Paris, France (hybrid event)

[Website](https://react.paris/) - [Twitter](https://x.com/BeJS_)
=======
March 20 - 21, 2025. In-person in Paris, France (hybrid event)

[Website](https://react.paris/) - [Twitter](https://x.com/BeJS_)

### React Native Connection 2025 {/*react-native-connection-2025*/}
April 3 (Reanimated Training) + April 4 (Conference), 2025. Paris, France.

[Website](https://reactnativeconnection.io/) - [X](https://x.com/reactnativeconn) - [Bluesky](https://bsky.app/profile/reactnativeconnect.bsky.social)

### CityJS London 2025 {/*cityjs-london*/}
April 23 - 25, 2025. In-person in London, UK

[Website](https://london.cityjsconf.org/) - [Twitter](https://x.com/cityjsconf) - [Bluesky](https://bsky.app/profile/cityjsconf.bsky.social)
>>>>>>> a5aad0d5e92872ef715b462b1dd6dcbeb45cf781

### App.js Conf 2025 {/*appjs-conf-2025*/}
May 28 - 30, 2025. In-person in Kraków, Poland + remote

[Website](https://appjs.co) - [Twitter](https://twitter.com/appjsconf)

### CityJS Athens 2025 {/*cityjs-athens*/}
May 27 - 31, 2025. In-person in Athens, Greece

[Website](https://athens.cityjsconf.org/) - [Twitter](https://x.com/cityjsconf) - [Bluesky](https://bsky.app/profile/cityjsconf.bsky.social)

### React Summit 2025 {/*react-summit-2025*/}
June 13 - 17, 2025. In-person in Amsterdam, Netherlands + remote (hybrid event)

Expand Down
6 changes: 6 additions & 0 deletions src/content/learn/add-react-to-an-existing-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,15 @@ title: 將 React 加入到一個現有的專案

以下是我們推薦的設定方式:

<<<<<<< HEAD
1. 使用其中一個[基於 React 的框架]((/learn/start-a-new-react-project))來**建構你的應用程式中的 React 部分**。
2. 在你的框架設定中將 **`/some-app` 指定為 *基本路徑***(這裡是如何設定:[Next.js](https://nextjs.org/docs/app/api-reference/config/next-config-js/basePath)、[Gatsby](https://www.gatsbyjs.com/docs/how-to/previews-deploys-hosting/path-prefix/))。
3. **設定你的伺服器或代理**,讓所有在 `/some-app/` 下的請求都由 React 應用程式處理。
=======
1. **Build the React part of your app** using one of the [React-based frameworks](/learn/start-a-new-react-project).
2. **Specify `/some-app` as the *base path*** in your framework's configuration (here's how: [Next.js](https://nextjs.org/docs/app/api-reference/config/next-config-js/basePath), [Gatsby](https://www.gatsbyjs.com/docs/how-to/previews-deploys-hosting/path-prefix/)).
3. **Configure your server or a proxy** so that all requests under `/some-app/` are handled by your React app.
>>>>>>> a5aad0d5e92872ef715b462b1dd6dcbeb45cf781

這可以確保你的應用程式中 React 部分能夠[受益於這些框架所內建的最佳實踐](/learn/start-a-new-react-project#can-i-use-react-without-a-framework)。

Expand Down
4 changes: 4 additions & 0 deletions src/content/learn/react-developer-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ react-devtools

## 行動裝置(React Native) {/*mobile-react-native*/}

<<<<<<< HEAD
若要檢查使用 [React Native](https://reactnative.dev/) 建立的應用程式,你可以使用 [React Native DevTools](https://reactnative.dev/docs/react-native-devtools),這是一個深度整合 React Developer Tools 的內建偵錯工具。所有功能都與瀏覽器擴充功能完全相同,包含原生元素的高亮顯示和選取功能。
=======
To inspect apps built with [React Native](https://reactnative.dev/), you can use [React Native DevTools](https://reactnative.dev/docs/react-native-devtools), the built-in debugger that deeply integrates React Developer Tools. All features work identically to the browser extension, including native element highlighting and selection.
>>>>>>> a5aad0d5e92872ef715b462b1dd6dcbeb45cf781

[深入了解 React Native 的偵錯功能。](https://reactnative.dev/docs/debugging)

Expand Down
6 changes: 3 additions & 3 deletions src/content/reference/react/useActionState.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ If used with a Server Function, `useActionState` allows the server's response fr
`useActionState` returns an array with the following values:

1. The current state. During the first render, it will match the `initialState` you have passed. After the action is invoked, it will match the value returned by the action.
2. A new action that you can pass as the `action` prop to your `form` component or `formAction` prop to any `button` component within the form.
2. A new action that you can pass as the `action` prop to your `form` component or `formAction` prop to any `button` component within the form. The action can also be called manually within [`startTransition`](/reference/react/startTransition).
3. The `isPending` flag that tells you whether there is a pending Transition.

#### Caveats {/*caveats*/}
Expand Down Expand Up @@ -102,8 +102,8 @@ function MyComponent() {
`useActionState` returns an array with the following items:

1. The <CodeStep step={1}>current state</CodeStep> of the form, which is initially set to the <CodeStep step={4}>initial state</CodeStep> you provided, and after the form is submitted is set to the return value of the <CodeStep step={3}>action</CodeStep> you provided.
2. A <CodeStep step={2}>new action</CodeStep> that you pass to `<form>` as its `action` prop.
3. A <CodeStep step={1}>pending state</CodeStep> that you can utilise whilst your action is processing.
2. A <CodeStep step={2}>new action</CodeStep> that you pass to `<form>` as its `action` prop or call manually within `startTransition`.
3. A <CodeStep step={1}>pending state</CodeStep> that you can utilise while your action is processing.

When the form is submitted, the <CodeStep step={3}>action</CodeStep> function that you provided will be called. Its return value will become the new <CodeStep step={1}>current state</CodeStep> of the form.

Expand Down
2 changes: 1 addition & 1 deletion src/content/reference/react/useImperativeHandle.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function MyInput({ ref }) {

<Note>

Starting with React 19, [`ref` is available a prop.](/blog/2024/12/05/react-19#ref-as-a-prop) In React 18 and earlier, it was necessary to get the `ref` from [`forwardRef`.](/reference/react/forwardRef)
Starting with React 19, [`ref` is available as a prop.](/blog/2024/12/05/react-19#ref-as-a-prop) In React 18 and earlier, it was necessary to get the `ref` from [`forwardRef`.](/reference/react/forwardRef)

</Note>

Expand Down
Loading