Skip to content

Commit

Permalink
Merge pull request #306 from reactjs/sync-19aa5b48
Browse files Browse the repository at this point in the history
* fix: correct prev link in `hello-world` (#5595)

* fix typo (#5611)

* Fix fonts

* Update .gitignore

* fix(beta): typo on renderToReadableStream assetMap (#5621)

* Update legacy.md

* fix og images

* A typo (#5644)

It should be `useContext(AuthContext)` whereas it's `useContext(AuthProvider)`.

* Add React Norway to events pages (#5641)

* Add React Norway to conferences page

* Add React Norway to beta docs events

* (tic-tac-toe) fix or-and in sentence (#5646)

* 🐛 (tic-tac-toe) fix or-and in sentence

* chore: use an just like previous para

---------

Co-authored-by: Delphine Bugner <[email protected]>
Co-authored-by: Strek <[email protected]>

* Update react-redux connect documentation link on HOC page to updated react redux docs (#5624)

* Update team page

ghstack-source-id: fd330d5eeb1e050d792064492193dfbdabee24a5
Pull Request resolved: reactjs/react.dev#5658

* Docs: Fix `useEffect` link typo in `react/useLayoutEffect.md` (#5661)

* fix typo

* fix typo

* chore: update text color of console block (#5666)

* missing word: "in" (#5665)

* Fix a misleading style in the example (#5660)

* Make consistent

* Update higher-order-components.md

---------

Co-authored-by: Xavi Lee <[email protected]>
Co-authored-by: 이동현 <[email protected]>
Co-authored-by: Dan Abramov <[email protected]>
Co-authored-by: Marcos Bérgamo <[email protected]>
Co-authored-by: Sophie Alpert <[email protected]>
Co-authored-by: Dan Lebo <[email protected]>
Co-authored-by: Ruokai Zhao <[email protected]>
Co-authored-by: Sean Keegan <[email protected]>
Co-authored-by: Delphine Bugner <[email protected]>
Co-authored-by: Delphine Bugner <[email protected]>
Co-authored-by: Strek <[email protected]>
Co-authored-by: Sami Lieberman <[email protected]>
Co-authored-by: Joe Savona <[email protected]>
Co-authored-by: Laube <[email protected]>
Co-authored-by: Kk Shinkai <[email protected]>
Co-authored-by: Phil <[email protected]>
  • Loading branch information
16 people authored Mar 21, 2023
2 parents 602cd1f + 7b44f2a commit de5e793
Show file tree
Hide file tree
Showing 23 changed files with 45 additions and 21 deletions.
4 changes: 1 addition & 3 deletions beta/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,4 @@ yarn-error.log*
.vercel

# external fonts
public/fonts/Optimistic_Display_W_Lt.woff2
public/fonts/Optimistic_Display_W_Md.woff2
public/fonts/Optimistic_Display_W_Bd.woff2
public/fonts/Optimistic_*.woff2
Binary file modified beta/public/images/og-blog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified beta/public/images/og-community.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified beta/public/images/og-home.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified beta/public/images/og-learn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified beta/public/images/og-reference.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified beta/public/images/og-unknown.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added beta/public/images/team/mengdi-chen.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions beta/scripts/downloadFonts.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,15 @@ execSync(
execSync(
'curl https://conf.reactjs.org/fonts/Optimistic_Display_W_Bd.woff2 --output public/fonts/Optimistic_Display_W_Bd.woff2'
);
execSync(
'curl https://conf.reactjs.org/fonts/Optimistic_Display_W_SBd.woff2 --output public/fonts/Optimistic_Display_W_SBd.woff2'
);
execSync(
'curl https://conf.reactjs.org/fonts/Optimistic_Text_W_Rg.woff2 --output public/fonts/Optimistic_Text_W_Rg.woff2'
);
execSync(
'curl https://conf.reactjs.org/fonts/Optimistic_Text_W_Md.woff2 --output public/fonts/Optimistic_Text_W_Md.woff2'
);
execSync(
'curl https://conf.reactjs.org/fonts/Optimistic_Text_W_Bd.woff2 --output public/fonts/Optimistic_Text_W_Bd.woff2'
);
2 changes: 1 addition & 1 deletion beta/src/components/MDX/ConsoleBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function ConsoleBlock({level = 'error', children}: ConsoleBlockProps) {
<Box className="bg-gray-300 dark:bg-gray-90" width="15px" />
</div>
<div className="flex text-sm px-4">
<div className="border-b-2 border-gray-300 dark:border-gray-90">
<div className="border-b-2 border-gray-300 dark:border-gray-90 dark:text-gray-30 text-gray-50">
Console
</div>
<div className="px-4 py-2 flex">
Expand Down
5 changes: 5 additions & 0 deletions beta/src/content/community/conferences.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ June 2 & 6, 2023. In-person in Amsterdam, Netherlands + remote first interactivi

[Website](https://reactsummit.com) - [Twitter](https://twitter.com/reactsummit) - [Facebook](https://www.facebook.com/reactamsterdam) - [Videos](https://youtube.com/c/ReactConferences)

### React Norway 2023 {/*react-norway-2023*/}
June 16th, 2023. Larvik, Norway

[Website](https://reactnorway.com/) - [Twitter](https://twitter.com/ReactNorway/) - [Facebook](https://www.facebook.com/reactdaynorway/)

### ReactNext 2023 {/*reactnext-2023*/}
June 27th, 2023. Tel Aviv, Israel

Expand Down
8 changes: 6 additions & 2 deletions beta/src/content/community/team.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The React Core team members work full time on the core component APIs, the engin

Current members of the React team are listed in alphabetical order below.

<TeamMember name="Andrew Clark" permalink="andrew-clark" photo="/images/team/acdlite.jpg" github="acdlite" twitter="acdlite" title="Engineer at Meta">
<TeamMember name="Andrew Clark" permalink="andrew-clark" photo="/images/team/acdlite.jpg" github="acdlite" twitter="acdlite" title="Engineer at Vercel">
Andrew got started with web development by making sites with WordPress, and eventually tricked himself into doing JavaScript. His favorite pastime is karaoke. Andrew is either a Disney villain or a Disney princess, depending on the day.
</TeamMember>

Expand All @@ -38,10 +38,14 @@ Current members of the React team are listed in alphabetical order below.
Lauren’s programming career peaked when she first discovered the `<marquee>` tag. She’s been chasing that high ever since. When she’s not adding bugs into React, she enjoys dropping cheeky memes in chat, and playing all too many video games with her partner, and her dog Zelda.
</TeamMember>

<TeamMember name="Luna Ruan" permalink="luna-ruan" photo="/images/team/lunaruan.jpg" github="lunaruan" twitter="lunaruan" title="Engineer at Meta">
<TeamMember name="Luna Ruan" permalink="luna-ruan" photo="/images/team/lunaruan.jpg" github="lunaruan" twitter="lunaruan" title="Independent Engineer">
Luna learned programming because she thought it meant creating video games. Instead, she ended up working on the Pinterest web app, and now on React itself. Luna doesn't want to make video games anymore, but she plans to do creative writing if she ever gets bored.
</TeamMember>

<TeamMember name="Mengdi Chen" permalink="mengdi-chen" photo="/images/team/mengdi-chen.jpg" github="mondaychen" twitter="mengdi_en" title="Engineer at Meta">
While working on his Digital Arts degree Mengdi was conceited about his front-end skills because his CSS worked perfectly even on IE6. But soon React opened a new door of programming for him, and he has been dreaming of joining the React team ever since. Outside of work, he is usually busy chasing his two kids around or collecting strange recipes.
</TeamMember>

<TeamMember name="Mofei Zhang" permalink="mofei-zhang" photo="/images/team/mofei-zhang.png" github="mofeiZ" title="Engineer at Meta">
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>
Expand Down
2 changes: 1 addition & 1 deletion beta/src/content/learn/conditional-rendering.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ If you're coming from an object-oriented programming background, you might assum
</DeepDive>
Now let's say you want to wrap the completed item's text into another HTML tag, like `<del>` to strike it out. You can add even more newlines and parentheses so that it's easier to nest more JSX each of the cases:
Now let's say you want to wrap the completed item's text into another HTML tag, like `<del>` to strike it out. You can add even more newlines and parentheses so that it's easier to nest more JSX in each of the cases:

<Sandpack>

Expand Down
8 changes: 4 additions & 4 deletions beta/src/content/learn/javascript-in-jsx-with-curly-braces.md
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ export default function TodoList() {
```css
body { padding: 0; margin: 0 }
body > div > div { padding: 20px; }
.avatar { border-radius: 50%; height: 90px; }
.avatar { border-radius: 50%; }
```
</Sandpack>
Expand Down Expand Up @@ -520,7 +520,7 @@ export default function TodoList() {
```css
body { padding: 0; margin: 0 }
body > div > div { padding: 20px; }
.avatar { border-radius: 50%; height: 90px; }
.avatar { border-radius: 50%; }
```
</Sandpack>
Expand Down Expand Up @@ -575,7 +575,7 @@ export function getImageUrl(person) {
```css
body { padding: 0; margin: 0 }
body > div > div { padding: 20px; }
.avatar { border-radius: 50%; height: 90px; }
.avatar { border-radius: 50%; }
```
</Sandpack>
Expand All @@ -584,4 +584,4 @@ Variables and functions can help you keep the markup simple!
</Solution>
</Challenges>
</Challenges>
2 changes: 1 addition & 1 deletion beta/src/content/learn/tutorial-tic-tac-toe.md
Original file line number Diff line number Diff line change
Expand Up @@ -1410,7 +1410,7 @@ But wait, there's a problem. Try clicking on the same square multiple times:
The `X` is overwritten by an `O`! While this would add a very interesting twist to the game, we're going to stick to the original rules for now.
When you mark a square with a `X` or a `O` you aren't first checking to see if the square already has a `X` or `O` value. You can fix this by *returning early*. You'll check to see if the square already has a `X` or and `O`. If the square is already filled, you will `return` in the `handleClick` function early--before it tries to update the board state.
When you mark a square with a `X` or an `O` you aren't first checking to see if the square already has a `X` or `O` value. You can fix this by *returning early*. You'll check to see if the square already has a `X` or an `O`. If the square is already filled, you will `return` in the `handleClick` function early--before it tries to update the board state.
```js {2,3,4}
function handleClick(i) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ const assetMap = {

async function handler(request) {
const stream = await renderToReadableStream(<App assetMap={assetMap} />, {
bootstrapScripts: [assets['/main.js']]
bootstrapScripts: [assetMap['/main.js']]
});
return new Response(stream, {
headers: { 'content-type': 'text/html' },
Expand All @@ -188,7 +188,7 @@ async function handler(request) {
const stream = await renderToReadableStream(<App assetMap={assetMap} />, {
// Careful: It's safe to stringify() this because this data isn't user-generated.
bootstrapScriptContent: `window.assetMap = ${JSON.stringify(assetMap)};`,
bootstrapScripts: [assets['/main.js']],
bootstrapScripts: [assetMap['/main.js']],
});
return new Response(stream, {
headers: { 'content-type': 'text/html' },
Expand Down
4 changes: 2 additions & 2 deletions beta/src/content/reference/react/legacy.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: "Legacy React APIs"

<Intro>

These APIs are exported from the `react` package, but they are not recommended for use in the newly written code. See the linked individual API pages for the suggested alternatives.
These APIs are exported from the `react` package, but they are not recommended for use in newly written code. See the linked individual API pages for the suggested alternatives.

</Intro>

Expand All @@ -31,4 +31,4 @@ These APIs will be removed in a future major version of React.

</Deprecated>

* [`createFactory`](/reference/react/createFactory) lets you create a function that produces React elements of a certain type.
* [`createFactory`](/reference/react/createFactory) lets you create a function that produces React elements of a certain type.
2 changes: 1 addition & 1 deletion beta/src/content/reference/react/useContext.md
Original file line number Diff line number Diff line change
Expand Up @@ -1337,7 +1337,7 @@ function MyApp() {
}
```
As a result of this change, even if `MyApp` needs to re-render, the components calling `useContext(AuthProvider)` won't need to re-render unless `currentUser` has changed. Read more about [`useMemo`](/reference/react/useMemo#skipping-re-rendering-of-components) and [`useCallback`.](/reference/react/useCallback#skipping-re-rendering-of-components)
As a result of this change, even if `MyApp` needs to re-render, the components calling `useContext(AuthContext)` won't need to re-render unless `currentUser` has changed. Read more about [`useMemo`](/reference/react/useMemo#skipping-re-rendering-of-components) and [`useCallback`.](/reference/react/useCallback#skipping-re-rendering-of-components)
---
Expand Down
2 changes: 1 addition & 1 deletion beta/src/content/reference/react/useLayoutEffect.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function Tooltip() {
* Effects **only run on the client.** They don't run during server rendering.
* The code inside `useLayoutEffect` and all state updates scheduled from it **block the browser from repainting the screen.** When used excessively, this can make your app very slow. When possible, prefer [`useEffect`.](/reference/reac/useEffect)
* The code inside `useLayoutEffect` and all state updates scheduled from it **block the browser from repainting the screen.** When used excessively, this can make your app very slow. When possible, prefer [`useEffect`.](/reference/react/useEffect)
---
Expand Down
2 changes: 1 addition & 1 deletion beta/src/content/reference/react/useReducer.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ React will set the next state to the result of calling the `reducer` function yo
* If the new value you provide is identical to the current `state`, as determined by an [`Object.is`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is) comparison, React will **skip re-rendering the component and its children.** This is an optimization. React may still need to call your component before ignoring the result, but it shouldn't affect your code.
* React [batches state updates.](/learn/queueing-a-series-of-state-updates) It updates the screen **after all the event handlers have run** and have called their `set` functions. This prevents multiple re-renders during a single event. In the rare case that you need to force React to update the screen earlier, for example to access the DOM, you can use [`flushSync`.](/reference/react-dom/flushsync)
* React [batches state updates.](/learn/queueing-a-series-of-state-updates) It updates the screen **after all the event handlers have run** and have called their `set` functions. This prevents multiple re-renders during a single event. In the rare case that you need to force React to update the screen earlier, for example to access the DOM, you can use [`flushSync`.](/reference/react-dom/flushSync)
---
Expand Down
5 changes: 5 additions & 0 deletions content/community/conferences.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ June 2 & 6, 2023. In-person in Amsterdam, Netherlands + remote first interactivi

[Website](https://reactsummit.com) - [Twitter](https://twitter.com/reactsummit) - [Facebook](https://www.facebook.com/reactamsterdam) - [Videos](https://youtube.com/c/ReactConferences)

### React Norway 2023 {#react-norway-2023}
June 16th, 2023. Larvik, Norway

[Website](https://reactnorway.com/) - [Twitter](https://twitter.com/ReactNorway/) - [Facebook](https://www.facebook.com/reactdaynorway/)

### ReactNext 2023 {#reactnext}
June 27th, 2023. Tel Aviv, Israel

Expand Down
2 changes: 1 addition & 1 deletion content/docs/hello-world.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
id: hello-world
title: Hallo Welt
permalink: docs/hello-world.html
prev: cdn-links.html
prev: release-channels.html
next: introducing-jsx.html
---

Expand Down
2 changes: 1 addition & 1 deletion content/docs/higher-order-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const EnhancedComponent = higherOrderComponent(WrappedComponent);

Während eine Komponente alle Props in UI umwandelt, wandelt die Higher-Order-Komponente eine Komponente in eine andere Komponente um.

HOCs finden sich häufig in React-Bibliotheken von Drittanbietern, als Beispiele dafür gelten [`connect`](https://github.com/reduxjs/react-redux/blob/master/docs/api/connect.md#connect) von Redux und [`createFragmentContainer`](https://relay.dev/docs/v10.1.3/fragment-container/#createfragmentcontainer) von Relay.
HOCs finden sich häufig in React-Bibliotheken von Drittanbietern, als Beispiele dafür gelten [`connect`](https://react-redux.js.org/api/connect) von Redux und [`createFragmentContainer`](https://relay.dev/docs/v10.1.3/fragment-container/#createfragmentcontainer) von Relay.

In diesem Dokument, werden wir erörtern, warum Higher-Order-Komponenten nützlich sind und wie du deine eigene schreiben kannst.

Expand Down

0 comments on commit de5e793

Please sign in to comment.