Skip to content

Commit

Permalink
Merge branch 'main' into sync-1697ae89
Browse files Browse the repository at this point in the history
  • Loading branch information
khakimio authored Oct 15, 2024
2 parents d49604e + 6fb01b4 commit 8fd8900
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 101 deletions.
4 changes: 2 additions & 2 deletions public/rss.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<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>
<link>https://react.dev/</link>
<generator>react.dev rss module</generator>
<lastBuildDate>Tue, 20 Aug 2024 08:06:26 GMT</lastBuildDate>
<lastBuildDate>Tue, 15 Oct 2024 19:03:53 GMT</lastBuildDate>
<atom:link href="https://react.dev/rss.xml" rel="self" type="application/rss+xml"/>
<pubDate>Tue, 20 Aug 2024 08:06:26 GMT</pubDate>
<pubDate>Tue, 15 Oct 2024 19:03:53 GMT</pubDate>
<language><![CDATA[en]]></language>
<item>
<title><![CDATA[React Conf 2024 Recap]]></title>
Expand Down
82 changes: 1 addition & 81 deletions src/content/community/conferences.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,81 +10,6 @@ Do you know of a local React.js conference? Add it here! (Please keep the list c

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

<<<<<<< HEAD
### React Paris 2024 {/*react-paris-2024*/}
March 22, 2024. In-person in Paris, France + Remote (hybrid)

[Website](https://react.paris/) - [Twitter](https://twitter.com/BeJS_) - [LinkedIn](https://www.linkedin.com/events/7150816372074192900/comments/)

### Epic Web Conf 2024 {/*epic-web-2024*/}
April 10 - 11, 2024. In-person in Park City, UT, USA

[Website](https://www.epicweb.dev/conf) - [YouTube](https://www.youtube.com/@EpicWebDev)

### React Miami 2024 {/*react-miami-2024*/}
April 19 - 20, 2024. In-person in Miami, FL, USA

[Website](https://reactmiami.com/) - [Twitter](https://twitter.com/ReactMiamiConf)

### React Connection 2024 {/*react-connection-2024*/}
April 22, 2024. In-person in Paris, France

[Website](https://reactconnection.io/) - [Twitter](https://twitter.com/ReactConn)

### React Native Connection 2024 {/*react-native-connection-2024*/}
April 23, 2024. In-person in Paris, France

[Website](https://reactnativeconnection.io/) - [Twitter](https://twitter.com/ReactNativeConn)

### React Conf 2024 {/*react-conf-2024*/}
May 15 - 16, 2024. In-person in Henderson, NV, USA + remote

[Website](https://conf.react.dev) - [Twitter](https://twitter.com/reactjs)

### App.js Conf 2024 {/*appjs-conf-2024*/}
May 22 - 24, 2024. In-person in Kraków, Poland + remote

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


### Frontend Nation 2024 {/*frontend-nation-2024*/}
June 4 - 7, 2024. Online

[Website](https://frontendnation.com/) - [Twitter](https://twitter.com/frontendnation)

### React Summit 2024 {/*react-summit-2024*/}
June 14 & 18, 2024. In-person in Amsterdam, Netherlands + remote (hybrid event)

[Website](https://reactsummit.com/) - [Twitter](https://twitter.com/reactsummit) - [Videos](https://portal.gitnation.org/)

### Render(ATL) 2024 🍑 {/*renderatl-2024-*/}
June 12 - June 14, 2024. Atlanta, GA, USA

[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#/)

### React Norway 2024 {/*react-norway-2024*/}
June 14, 2024. In-person at Farris Bad Hotel in Larvik, Norway and online (hybrid event).

[Website](https://reactnorway.com/) - [Twitter](https://twitter.com/ReactNorway)


### React Nexus 2024 {/*react-nexus-2024*/}
July 04 & 05, 2024. Bangalore, India (In-person event)

[Website](https://reactnexus.com/) - [Twitter](https://twitter.com/ReactNexus) - [Linkedin](https://www.linkedin.com/company/react-nexus) - [YouTube](https://www.youtube.com/reactify_in)

### Chain React 2024 {/*chain-react-2024*/}
July 17-19, 2024. In-person in Portland, OR, USA

[Website](https://chainreactconf.com) - [Twitter](https://twitter.com/ChainReactConf)

### The Geek Conf 2024 {/*the-geek-conf-2024*/}
July 25, 2024. In-person in Berlin, Germany + remote (hybrid event)

[Website](https://thegeekconf.com) - [Twitter](https://twitter.com/thegeekconf)

=======
>>>>>>> fe37c42e0b51167d7f3c98593f50de997d666266
### React Universe Conf 2024 {/*react-universe-conf-2024*/}
September 5-6, 2024. Wrocław, Poland.

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

[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)

<<<<<<< HEAD
## Past Conferences {/*past-conferences*/}

=======
### React Brussels 2024 {/*react-brussels-2024*/}
October 18, 2024. In-person in Brussels, Belgium (hybrid event)

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

[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#/)

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

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

[Website](https://react.paris/) - [Twitter](https://twitter.com/BeJS_) - [LinkedIn](https://www.linkedin.com/events/7150816372074192900/comments/)
[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)

### React Day Berlin 2023 {/*react-day-berlin-2023*/}
December 8 & 12, 2023. In-person in Berlin, Germany + remote first interactivity (hybrid event)
Expand Down
25 changes: 23 additions & 2 deletions src/content/learn/react-compiler.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ These docs are still a work in progress. More documentation is available in the

<Note>
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.

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.
</Note>

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.
Expand Down Expand Up @@ -226,6 +224,29 @@ module.exports = function () {

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

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.

<TerminalBlock>
npm install react-compiler-runtime@experimental
</TerminalBlock>

You should also add the correct `target` to your compiler config, where `target` is the major version of React you are targeting:

```js {3}
// babel.config.js
const ReactCompilerConfig = {
target: '18' // '17' | '18' | '19'
};

module.exports = function () {
return {
plugins: [
['babel-plugin-react-compiler', ReactCompilerConfig],
],
};
};
```

### Vite {/*usage-with-vite*/}

If you use Vite, you can add the plugin to vite-plugin-react:
Expand Down
10 changes: 0 additions & 10 deletions src/content/learn/thinking-in-react.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,21 +268,11 @@ React-те «модельдік» деректердің екі түрі бар:

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

<<<<<<< HEAD
1. **Күйлерді қолданатын компоненттерді анықтаңыз:**
* `ProductTable` күйлерге негізделген өнімдер тізімін фильтрлеу (іздеу сұрауы және чекбокс ұяшығының мәні).
* `SearchBar` сол күйді көрсету керек (іздеу мәтіні және чекбокс мәні).
1. **Олардың ортақ негізгі компонентін табыңыз:** Екі компоненттің ортақ негізгі компоненті `FilterableProductTable` болып табылады.
2. **Күй қайда тұратынын шешіңіз**: Фильтр мәтінін және чекбокс күй мәндерін `FilterableProductTable` ішінде сақтаймыз.

Осылайша күй мәндері `FilterableProductTable` ішінде орналасады.
=======
1. **Identify components that use state:**
* `ProductTable` needs to filter the product list based on that state (search text and checkbox value).
* `SearchBar` needs to display that state (search text and checkbox value).
2. **Find their common parent:** The first parent component both components share is `FilterableProductTable`.
3. **Decide where the state lives**: We'll keep the filter text and checked state values in `FilterableProductTable`.
>>>>>>> 1697ae89a3bbafd76998dd7496754e5358bc1e9a

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

Expand Down
18 changes: 12 additions & 6 deletions src/content/reference/react/useActionState.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ In earlier React Canary versions, this API was part of React DOM and called `use
`useActionState` is a Hook that allows you to update state based on the result of a form action.

```js
const [state, formAction] = useActionState(fn, initialState, permalink?);
const [state, formAction, isPending] = useActionState(fn, initialState, permalink?);
```
</Intro>
Expand All @@ -35,7 +35,7 @@ const [state, formAction] = useActionState(fn, initialState, permalink?);
{/* TODO T164397693: link to actions documentation once it exists */}
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.
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.
```js
import { useActionState } from "react";
Expand Down Expand Up @@ -71,10 +71,11 @@ If used with a Server Action, `useActionState` allows the server's response from
#### Returns {/*returns*/}
`useActionState` returns an array with exactly two values:
`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.
3. The `isPending` flag that tells you whether there is a pending Transition.
#### Caveats {/*caveats*/}
Expand Down Expand Up @@ -104,10 +105,11 @@ function MyComponent() {
}
```
`useActionState` returns an array with exactly two items:
`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.
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 All @@ -133,13 +135,13 @@ import { useActionState, useState } from "react";
import { addToCart } from "./actions.js";

function AddToCartForm({itemID, itemTitle}) {
const [message, formAction] = useActionState(addToCart, null);
const [message, formAction, isPending] = useActionState(addToCart, null);
return (
<form action={formAction}>
<h2>{itemTitle}</h2>
<input type="hidden" name="itemID" value={itemID} />
<button type="submit">Add to Cart</button>
{message}
{isPending ? "Loading..." : message}
</form>
);
}
Expand All @@ -162,6 +164,10 @@ export async function addToCart(prevState, queryData) {
if (itemID === "1") {
return "Added to cart";
} else {
// Add a fake delay to make waiting noticeable.
await new Promise(resolve => {
setTimeout(resolve, 2000);
});
return "Couldn't add to cart: the item is sold out.";
}
}
Expand Down

0 comments on commit 8fd8900

Please sign in to comment.