Skip to content

Commit 8fd8900

Browse files
authored
Merge branch 'main' into sync-1697ae89
2 parents d49604e + 6fb01b4 commit 8fd8900

5 files changed

Lines changed: 38 additions & 101 deletions

File tree

public/rss.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
<description><![CDATA[This blog is the official source for the updates from the React team. Anything important, including release notes or deprecation notices, will be posted here first.]]></description>
55
<link>https://react.dev/</link>
66
<generator>react.dev rss module</generator>
7-
<lastBuildDate>Tue, 20 Aug 2024 08:06:26 GMT</lastBuildDate>
7+
<lastBuildDate>Tue, 15 Oct 2024 19:03:53 GMT</lastBuildDate>
88
<atom:link href="https://react.dev/rss.xml" rel="self" type="application/rss+xml"/>
9-
<pubDate>Tue, 20 Aug 2024 08:06:26 GMT</pubDate>
9+
<pubDate>Tue, 15 Oct 2024 19:03:53 GMT</pubDate>
1010
<language><![CDATA[en]]></language>
1111
<item>
1212
<title><![CDATA[React Conf 2024 Recap]]></title>

src/content/community/conferences.md

Lines changed: 1 addition & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -10,81 +10,6 @@ Do you know of a local React.js conference? Add it here! (Please keep the list c
1010

1111
## Upcoming Conferences {/*upcoming-conferences*/}
1212

13-
<<<<<<< HEAD
14-
### React Paris 2024 {/*react-paris-2024*/}
15-
March 22, 2024. In-person in Paris, France + Remote (hybrid)
16-
17-
[Website](https://react.paris/) - [Twitter](https://twitter.com/BeJS_) - [LinkedIn](https://www.linkedin.com/events/7150816372074192900/comments/)
18-
19-
### Epic Web Conf 2024 {/*epic-web-2024*/}
20-
April 10 - 11, 2024. In-person in Park City, UT, USA
21-
22-
[Website](https://www.epicweb.dev/conf) - [YouTube](https://www.youtube.com/@EpicWebDev)
23-
24-
### React Miami 2024 {/*react-miami-2024*/}
25-
April 19 - 20, 2024. In-person in Miami, FL, USA
26-
27-
[Website](https://reactmiami.com/) - [Twitter](https://twitter.com/ReactMiamiConf)
28-
29-
### React Connection 2024 {/*react-connection-2024*/}
30-
April 22, 2024. In-person in Paris, France
31-
32-
[Website](https://reactconnection.io/) - [Twitter](https://twitter.com/ReactConn)
33-
34-
### React Native Connection 2024 {/*react-native-connection-2024*/}
35-
April 23, 2024. In-person in Paris, France
36-
37-
[Website](https://reactnativeconnection.io/) - [Twitter](https://twitter.com/ReactNativeConn)
38-
39-
### React Conf 2024 {/*react-conf-2024*/}
40-
May 15 - 16, 2024. In-person in Henderson, NV, USA + remote
41-
42-
[Website](https://conf.react.dev) - [Twitter](https://twitter.com/reactjs)
43-
44-
### App.js Conf 2024 {/*appjs-conf-2024*/}
45-
May 22 - 24, 2024. In-person in Kraków, Poland + remote
46-
47-
[Website](https://appjs.co) - [Twitter](https://twitter.com/appjsconf)
48-
49-
50-
### Frontend Nation 2024 {/*frontend-nation-2024*/}
51-
June 4 - 7, 2024. Online
52-
53-
[Website](https://frontendnation.com/) - [Twitter](https://twitter.com/frontendnation)
54-
55-
### React Summit 2024 {/*react-summit-2024*/}
56-
June 14 & 18, 2024. In-person in Amsterdam, Netherlands + remote (hybrid event)
57-
58-
[Website](https://reactsummit.com/) - [Twitter](https://twitter.com/reactsummit) - [Videos](https://portal.gitnation.org/)
59-
60-
### Render(ATL) 2024 🍑 {/*renderatl-2024-*/}
61-
June 12 - June 14, 2024. Atlanta, GA, USA
62-
63-
[Website](https://renderatl.com) - [Discord](https://www.renderatl.com/discord) - [Twitter](https://twitter.com/renderATL) - [Instagram](https://www.instagram.com/renderatl/) - [Facebook](https://www.facebook.com/renderatl/) - [LinkedIn](https://www.linkedin.com/company/renderatl) - [Podcast](https://www.renderatl.com/culture-and-code#/)
64-
65-
### React Norway 2024 {/*react-norway-2024*/}
66-
June 14, 2024. In-person at Farris Bad Hotel in Larvik, Norway and online (hybrid event).
67-
68-
[Website](https://reactnorway.com/) - [Twitter](https://twitter.com/ReactNorway)
69-
70-
71-
### React Nexus 2024 {/*react-nexus-2024*/}
72-
July 04 & 05, 2024. Bangalore, India (In-person event)
73-
74-
[Website](https://reactnexus.com/) - [Twitter](https://twitter.com/ReactNexus) - [Linkedin](https://www.linkedin.com/company/react-nexus) - [YouTube](https://www.youtube.com/reactify_in)
75-
76-
### Chain React 2024 {/*chain-react-2024*/}
77-
July 17-19, 2024. In-person in Portland, OR, USA
78-
79-
[Website](https://chainreactconf.com) - [Twitter](https://twitter.com/ChainReactConf)
80-
81-
### The Geek Conf 2024 {/*the-geek-conf-2024*/}
82-
July 25, 2024. In-person in Berlin, Germany + remote (hybrid event)
83-
84-
[Website](https://thegeekconf.com) - [Twitter](https://twitter.com/thegeekconf)
85-
86-
=======
87-
>>>>>>> fe37c42e0b51167d7f3c98593f50de997d666266
8813
### React Universe Conf 2024 {/*react-universe-conf-2024*/}
8914
September 5-6, 2024. Wrocław, Poland.
9015

@@ -105,10 +30,6 @@ October 17 - 19, 2024. In-person in Goa, India (hybrid event) + Oct 15 2024 - re
10530

10631
[Website](https://www.reactindia.io) - [Twitter](https://twitter.com/react_india) - [Facebook](https://www.facebook.com/ReactJSIndia) - [Youtube](https://www.youtube.com/channel/UCaFbHCBkPvVv1bWs_jwYt3w)
10732

108-
<<<<<<< HEAD
109-
## Past Conferences {/*past-conferences*/}
110-
111-
=======
11233
### React Brussels 2024 {/*react-brussels-2024*/}
11334
October 18, 2024. In-person in Brussels, Belgium (hybrid event)
11435

@@ -181,7 +102,6 @@ June 12 - June 14, 2024. Atlanta, GA, USA
181102

182103
[Website](https://renderatl.com) - [Discord](https://www.renderatl.com/discord) - [Twitter](https://twitter.com/renderATL) - [Instagram](https://www.instagram.com/renderatl/) - [Facebook](https://www.facebook.com/renderatl/) - [LinkedIn](https://www.linkedin.com/company/renderatl) - [Podcast](https://www.renderatl.com/culture-and-code#/)
183104

184-
>>>>>>> fe37c42e0b51167d7f3c98593f50de997d666266
185105
### Frontend Nation 2024 {/*frontend-nation-2024*/}
186106
June 4 - 7, 2024. Online
187107

@@ -215,7 +135,7 @@ April 10 - 11, 2024. In-person in Park City, UT, USA
215135
### React Paris 2024 {/*react-paris-2024*/}
216136
March 22, 2024. In-person in Paris, France + Remote (hybrid)
217137

218-
[Website](https://react.paris/) - [Twitter](https://twitter.com/BeJS_) - [LinkedIn](https://www.linkedin.com/events/7150816372074192900/comments/)
138+
[Website](https://react.paris/) - [Twitter](https://twitter.com/BeJS_) - [LinkedIn](https://www.linkedin.com/events/7150816372074192900/comments/) - [Videos](https://www.youtube.com/playlist?list=PL53Z0yyYnpWhUzgvr2Nys3kZBBLcY0TA7)
219139

220140
### React Day Berlin 2023 {/*react-day-berlin-2023*/}
221141
December 8 & 12, 2023. In-person in Berlin, Germany + remote first interactivity (hybrid event)

src/content/learn/react-compiler.md

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ These docs are still a work in progress. More documentation is available in the
2020

2121
<Note>
2222
React Compiler is a new experimental compiler that we've open sourced to get early feedback from the community. It still has rough edges and is not yet fully ready for production.
23-
24-
React Compiler requires React 19 RC. If you are unable to upgrade to React 19, you may try a userspace implementation of the cache function as described in the [Working Group](https://github.com/reactwg/react-compiler/discussions/6). However, please note that this is not recommended and you should upgrade to React 19 when possible.
2523
</Note>
2624

2725
React Compiler is a new experimental compiler that we've open sourced to get early feedback from the community. It is a build-time only tool that automatically optimizes your React app. It works with plain JavaScript, and understands the [Rules of React](/reference/rules), so you don't need to rewrite any code to use it.
@@ -226,6 +224,29 @@ module.exports = function () {
226224

227225
`babel-plugin-react-compiler` should run first before other Babel plugins as the compiler requires the input source information for sound analysis.
228226

227+
React Compiler works best with React 19 RC. If you are unable to upgrade, you can install the extra `react-compiler-runtime` package which will allow the compiled code to run on versions prior to 19. However, note that the minimum supported version is 17.
228+
229+
<TerminalBlock>
230+
npm install react-compiler-runtime@experimental
231+
</TerminalBlock>
232+
233+
You should also add the correct `target` to your compiler config, where `target` is the major version of React you are targeting:
234+
235+
```js {3}
236+
// babel.config.js
237+
const ReactCompilerConfig = {
238+
target: '18' // '17' | '18' | '19'
239+
};
240+
241+
module.exports = function () {
242+
return {
243+
plugins: [
244+
['babel-plugin-react-compiler', ReactCompilerConfig],
245+
],
246+
};
247+
};
248+
```
249+
229250
### Vite {/*usage-with-vite*/}
230251

231252
If you use Vite, you can add the plugin to vite-plugin-react:

src/content/learn/thinking-in-react.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -268,21 +268,11 @@ React-те «модельдік» деректердің екі түрі бар:
268268

269269
Енді олар үшін стратегиямызды қарастырайық:
270270

271-
<<<<<<< HEAD
272-
1. **Күйлерді қолданатын компоненттерді анықтаңыз:**
273-
* `ProductTable` күйлерге негізделген өнімдер тізімін фильтрлеу (іздеу сұрауы және чекбокс ұяшығының мәні).
274-
* `SearchBar` сол күйді көрсету керек (іздеу мәтіні және чекбокс мәні).
275-
1. **Олардың ортақ негізгі компонентін табыңыз:** Екі компоненттің ортақ негізгі компоненті `FilterableProductTable` болып табылады.
276-
2. **Күй қайда тұратынын шешіңіз**: Фильтр мәтінін және чекбокс күй мәндерін `FilterableProductTable` ішінде сақтаймыз.
277-
278-
Осылайша күй мәндері `FilterableProductTable` ішінде орналасады.
279-
=======
280271
1. **Identify components that use state:**
281272
* `ProductTable` needs to filter the product list based on that state (search text and checkbox value).
282273
* `SearchBar` needs to display that state (search text and checkbox value).
283274
2. **Find their common parent:** The first parent component both components share is `FilterableProductTable`.
284275
3. **Decide where the state lives**: We'll keep the filter text and checked state values in `FilterableProductTable`.
285-
>>>>>>> 1697ae89a3bbafd76998dd7496754e5358bc1e9a
286276

287277
Компонент күйді [`useState()` Hook](/reference/react/useState) арқылы қосамыз. Хуктар - бұл React-ке қосылуға мүмкіндік беретін арнайы "ілмек" функциялар. `FilterableProductTable` жоғарғы жағына екі күй айнымалы мәнін қосыңыз және олардың бастапқы күйін көрсетіңіз:
288278

src/content/reference/react/useActionState.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ In earlier React Canary versions, this API was part of React DOM and called `use
2020
`useActionState` is a Hook that allows you to update state based on the result of a form action.
2121

2222
```js
23-
const [state, formAction] = useActionState(fn, initialState, permalink?);
23+
const [state, formAction, isPending] = useActionState(fn, initialState, permalink?);
2424
```
2525
2626
</Intro>
@@ -35,7 +35,7 @@ const [state, formAction] = useActionState(fn, initialState, permalink?);
3535
3636
{/* TODO T164397693: link to actions documentation once it exists */}
3737
38-
Call `useActionState` at the top level of your component to create component state that is updated [when a form action is invoked](/reference/react-dom/components/form). You pass `useActionState` an existing form action function as well as an initial state, and it returns a new action that you use in your form, along with the latest form state. The latest form state is also passed to the function that you provided.
38+
Call `useActionState` at the top level of your component to create component state that is updated [when a form action is invoked](/reference/react-dom/components/form). You pass `useActionState` an existing form action function as well as an initial state, and it returns a new action that you use in your form, along with the latest form state and whether the Action is still pending. The latest form state is also passed to the function that you provided.
3939
4040
```js
4141
import { useActionState } from "react";
@@ -71,10 +71,11 @@ If used with a Server Action, `useActionState` allows the server's response from
7171
7272
#### Returns {/*returns*/}
7373
74-
`useActionState` returns an array with exactly two values:
74+
`useActionState` returns an array with the following values:
7575
7676
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.
7777
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.
78+
3. The `isPending` flag that tells you whether there is a pending Transition.
7879
7980
#### Caveats {/*caveats*/}
8081
@@ -104,10 +105,11 @@ function MyComponent() {
104105
}
105106
```
106107
107-
`useActionState` returns an array with exactly two items:
108+
`useActionState` returns an array with the following items:
108109
109110
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.
110111
2. A <CodeStep step={2}>new action</CodeStep> that you pass to `<form>` as its `action` prop.
112+
3. A <CodeStep step={1}>pending state</CodeStep> that you can utilise whilst your action is processing.
111113
112114
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.
113115
@@ -133,13 +135,13 @@ import { useActionState, useState } from "react";
133135
import { addToCart } from "./actions.js";
134136

135137
function AddToCartForm({itemID, itemTitle}) {
136-
const [message, formAction] = useActionState(addToCart, null);
138+
const [message, formAction, isPending] = useActionState(addToCart, null);
137139
return (
138140
<form action={formAction}>
139141
<h2>{itemTitle}</h2>
140142
<input type="hidden" name="itemID" value={itemID} />
141143
<button type="submit">Add to Cart</button>
142-
{message}
144+
{isPending ? "Loading..." : message}
143145
</form>
144146
);
145147
}
@@ -162,6 +164,10 @@ export async function addToCart(prevState, queryData) {
162164
if (itemID === "1") {
163165
return "Added to cart";
164166
} else {
167+
// Add a fake delay to make waiting noticeable.
168+
await new Promise(resolve => {
169+
setTimeout(resolve, 2000);
170+
});
165171
return "Couldn't add to cart: the item is sold out.";
166172
}
167173
}

0 commit comments

Comments
 (0)