Skip to content

Commit

Permalink
Merge pull request #83 from reactjs/sync-5d2f7105
Browse files Browse the repository at this point in the history
Sync with react.dev @ 5d2f710
  • Loading branch information
gsteja2307 authored Feb 2, 2024
2 parents 6074a3a + 341d12f commit 356f9d2
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 15 deletions.
Binary file added public/images/team/noahlemen.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/components/Layout/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ export function Footer() {
<FooterLink href="https://opensource.fb.com/legal/terms/">
Terms
</FooterLink>
<div className="flex flex-row mt-8 gap-x-2">
<div className="flex flex-row items-center mt-8 gap-x-2">
<ExternalLink
aria-label="React on Facebook"
href="https://www.facebook.com/react"
Expand Down
8 changes: 4 additions & 4 deletions src/components/MDX/ErrorDecoder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ function replaceArgs(
/**
* Sindre Sorhus <https://sindresorhus.com>
* Released under MIT license
* https://github.com/sindresorhus/linkify-urls/blob/edd75a64a9c36d7025f102f666ddbb6cf0afa7cd/index.js#L4C25-L4C137
* https://github.com/sindresorhus/linkify-urls/blob/b2397096df152e2f799011f7a48e5f73b4bf1c7e/index.js#L5C1-L7C1
*
* The regex is used to extract URL from the string for linkify.
*/
const urlRegex =
/((?<!\+)https?:\/\/(?:www\.)?(?:[-\w.]+?[.@][a-zA-Z\d]{2,}|localhost)(?:[-\w.:%+~#*$!?&/=@]*?(?:,(?!\s))*?)*)/g;
const urlRegex = () =>
/((?:https?(?::\/\/))(?:www\.)?(?:[a-zA-Z\d-_.]+(?:(?:\.|@)[a-zA-Z\d]{2,})|localhost)(?:(?:[-a-zA-Z\d:%_+.~#!?&//=@]*)(?:[,](?![\s]))*)*)/g;

// When the message contains a URL (like https://fb.me/react-refs-must-have-owner),
// make it a clickable link.
function urlify(str: string): React.ReactNode[] {
const segments = str.split(urlRegex);
const segments = str.split(urlRegex());

return segments.map((message, i) => {
if (i % 2 === 1) {
Expand Down
2 changes: 2 additions & 0 deletions src/content/community/acknowledgements.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ We'd like to recognize a few people who have made significant contributions to R
* [Joe Critchley](https://github.com/joecritch)
* [Jeff Morrison](https://github.com/jeffmo)
* [Luna Ruan](https://github.com/lunaruan)
* [Kathryn Middleton](https://github.com/kmiddleton14)
* [Keyan Zhang](https://github.com/keyz)
* [Marco Salazar](https://github.com/salazarm)
* [Mengdi Chen](https://github.com/mondaychen)
Expand All @@ -46,6 +47,7 @@ We'd like to recognize a few people who have made significant contributions to R
* [Philipp Spiess](https://github.com/philipp-spiess)
* [Rachel Nabors](https://github.com/rachelnabors)
* [Robert Zhang](https://github.com/robertzhidealx)
* [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)
Expand Down
10 changes: 10 additions & 0 deletions src/content/community/conferences.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ Do you know of a local React.js conference? Add it here! (Please keep the list c

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

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

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

Expand All @@ -20,6 +25,11 @@ April 19 - 20, 2024. In-person in Miami, FL, USA

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

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

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

Expand Down
4 changes: 4 additions & 0 deletions src/content/community/team.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ Current members of the React team are listed in alphabetical order below.
Mofei started programming when she realized it can help her cheat in video games. She focused on operating systems in undergrad / grad school, but now finds herself happily tinkering on React. Outside of work, she enjoys debugging bouldering problems and planning her next backpacking trip(s).
</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’s interest in UI programming sparked during his education in music technology at NYU. At Meta, he's worked on internal tools, browsers, web performance, and is currently focused on React. Outside of work, Noah can be found tinkering with synthesizers or spending time with his cat.
</TeamMember>

<TeamMember name="Rick Hanlon" permalink="rick-hanlon" photo="/images/team/rickhanlonii.jpg" github="rickhanlonii" twitter="rickhanlonii" threads="rickhanlonii" personal="rickhanlon.codes" title="Engineer at Meta">
Ricky majored in theoretical math and somehow found himself on the React Native team for a couple years before joining the React team. When he's not programming you can find him snowboarding, biking, climbing, golfing, or closing GitHub issues that do not match the issue template.
</TeamMember>
Expand Down
2 changes: 0 additions & 2 deletions src/content/learn/adding-interactivity.md
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,6 @@ Arrays are another type of mutable JavaScript objects you can store in state and
```js
import { useState } from 'react';

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

let nextId = 3;
const initialList = [
{ id: 0, title: 'Big Bellies', seen: false },
{ id: 1, title: 'Lunar Landscape', seen: false },
Expand Down
26 changes: 20 additions & 6 deletions src/content/learn/thinking-in-react.md
Original file line number Diff line number Diff line change
Expand Up @@ -484,12 +484,26 @@ function FilterableProductTable({ products }) {
Inside the `SearchBar`, you will add the `onChange` event handlers and set the parent state from them:
```js {5}
<input
type="text"
value={filterText}
placeholder="Search..."
onChange={(e) => onFilterTextChange(e.target.value)} />
```js {4,5,13,19}
function SearchBar({
filterText,
inStockOnly,
onFilterTextChange,
onInStockOnlyChange
}) {
return (
<form>
<input
type="text"
value={filterText}
placeholder="Search..."
onChange={(e) => onFilterTextChange(e.target.value)}
/>
<label>
<input
type="checkbox"
checked={inStockOnly}
onChange={(e) => onInStockOnlyChange(e.target.checked)}
```
Now the application fully works!
Expand Down
5 changes: 3 additions & 2 deletions src/content/reference/react-dom/hooks/useFormState.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The `useFormState` Hook is currently only available in React's Canary and experi
`useFormState` is a Hook that allows you to update state based on the result of a form action.

```js
const [state, formAction] = useFormState(fn, initialState);
const [state, formAction] = useFormState(fn, initialState, permalink?);
```
</Intro>
Expand All @@ -25,7 +25,7 @@ const [state, formAction] = useFormState(fn, initialState);
## Reference {/*reference*/}
### `useFormState(action, initialState)` {/*useformstate*/}
### `useFormState(action, initialState, permalink?)` {/*useformstate*/}
{/* TODO T164397693: link to actions documentation once it exists */}
Expand Down Expand Up @@ -59,6 +59,7 @@ If used with a Server Action, `useFormState` allows the server's response from s
* `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.
* `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.
* **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.
{/* TODO T164397693: link to serializable values docs once it exists */}
Expand Down

0 comments on commit 356f9d2

Please sign in to comment.