Skip to content

Commit 0e5f385

Browse files
authored
Merge branch 'main' into sync-3563d95e
2 parents 5ead85d + e306321 commit 0e5f385

6 files changed

Lines changed: 26 additions & 11 deletions

File tree

public/images/team/noahlemen.jpg

330 KB
Loading

src/components/Layout/Footer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ export function Footer() {
333333
<FooterLink href="https://opensource.fb.com/legal/terms/">
334334
Terms
335335
</FooterLink>
336-
<div className="flex flex-row mt-8 gap-x-2">
336+
<div className="flex flex-row items-center mt-8 gap-x-2">
337337
<ExternalLink
338338
aria-label="React on Facebook"
339339
href="https://www.facebook.com/react"

src/content/community/acknowledgements.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ We'd like to recognize a few people who have made significant contributions to R
3535
* [Joe Critchley](https://github.com/joecritch)
3636
* [Jeff Morrison](https://github.com/jeffmo)
3737
* [Luna Ruan](https://github.com/lunaruan)
38+
* [Kathryn Middleton](https://github.com/kmiddleton14)
3839
* [Keyan Zhang](https://github.com/keyz)
3940
* [Marco Salazar](https://github.com/salazarm)
4041
* [Mengdi Chen](https://github.com/mondaychen)
@@ -46,6 +47,7 @@ We'd like to recognize a few people who have made significant contributions to R
4647
* [Philipp Spiess](https://github.com/philipp-spiess)
4748
* [Rachel Nabors](https://github.com/rachelnabors)
4849
* [Robert Zhang](https://github.com/robertzhidealx)
50+
* [Samuel Susla](https://github.com/sammy-SC)
4951
* [Sander Spies](https://github.com/sanderspies)
5052
* [Sasha Aickin](https://github.com/aickin)
5153
* [Sean Keegan](https://github.com/seanryankeegan)

src/content/learn/adding-interactivity.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,6 @@ Arrays are another type of mutable JavaScript objects you can store in state and
646646
```js
647647
import { useState } from 'react';
648648

649-
let nextId = 3;
650649
const initialList = [
651650
{ id: 0, title: 'Big Bellies', seen: false },
652651
{ id: 1, title: 'Lunar Landscape', seen: false },
@@ -714,7 +713,6 @@ If copying arrays in code gets tedious, you can use a library like [Immer](https
714713
import { useState } from 'react';
715714
import { useImmer } from 'use-immer';
716715

717-
let nextId = 3;
718716
const initialList = [
719717
{ id: 0, title: 'Big Bellies', seen: false },
720718
{ id: 1, title: 'Lunar Landscape', seen: false },

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

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -484,12 +484,26 @@ function FilterableProductTable({ products }) {
484484
485485
Inside the `SearchBar`, you will add the `onChange` event handlers and set the parent state from them:
486486
487-
```js {5}
488-
<input
489-
type="text"
490-
value={filterText}
491-
placeholder="Search..."
492-
onChange={(e) => onFilterTextChange(e.target.value)} />
487+
```js {4,5,13,19}
488+
function SearchBar({
489+
filterText,
490+
inStockOnly,
491+
onFilterTextChange,
492+
onInStockOnlyChange
493+
}) {
494+
return (
495+
<form>
496+
<input
497+
type="text"
498+
value={filterText}
499+
placeholder="Search..."
500+
onChange={(e) => onFilterTextChange(e.target.value)}
501+
/>
502+
<label>
503+
<input
504+
type="checkbox"
505+
checked={inStockOnly}
506+
onChange={(e) => onInStockOnlyChange(e.target.checked)}
493507
```
494508
495509
Now the application fully works!

src/content/reference/react-dom/hooks/useFormState.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The `useFormState` Hook is currently only available in React's Canary and experi
1414
`useFormState` is a Hook that allows you to update state based on the result of a form action.
1515

1616
```js
17-
const [state, formAction] = useFormState(fn, initialState);
17+
const [state, formAction] = useFormState(fn, initialState, permalink?);
1818
```
1919
2020
</Intro>
@@ -25,7 +25,7 @@ const [state, formAction] = useFormState(fn, initialState);
2525
2626
## Reference {/*reference*/}
2727
28-
### `useFormState(action, initialState)` {/*useformstate*/}
28+
### `useFormState(action, initialState, permalink?)` {/*useformstate*/}
2929
3030
{/* TODO T164397693: link to actions documentation once it exists */}
3131
@@ -59,6 +59,7 @@ If used with a Server Action, `useFormState` allows the server's response from s
5959
6060
* `fn`: The function to be called when the form is submitted or button pressed. When the function is called, it will receive the previous state of the form (initially the `initialState` that you pass, subsequently its previous return value) as its initial argument, followed by the arguments that a form action normally receives.
6161
* `initialState`: The value you want the state to be initially. It can be any serializable value. This argument is ignored after the action is first invoked.
62+
* **optional** `permalink`: A string containing the unique page URL that this form modifies. For use on pages with dynamic content (eg: feeds) in conjunction with progressive enhancement: if `fn` is a [server action](/reference/react/use-server) and the form is submitted before the JavaScript bundle loads, the browser will navigate to the specified permalink URL, rather than the current page's URL. Ensure that the same form component is rendered on the destination page (including the same action `fn` and `permalink`) so that React knows how to pass the state through. Once the form has been hydrated, this parameter has no effect.
6263
6364
{/* TODO T164397693: link to serializable values docs once it exists */}
6465

0 commit comments

Comments
 (0)