Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finished translating Choosing the state structure #557

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
172 commits
Select commit Hold shift + click to select a range
7fc996c
## Adding to an array
astropsy999 Jul 15, 2024
2aab80b
till ### Write concise update logic with Immer
astropsy999 Jul 16, 2024
033b3fa
finished translation and correction
astropsy999 Jul 20, 2024
1bb3ca9
Removeв package-lock.json and restored yarn.lock
astropsy999 Jul 21, 2024
2193a11
Update src/content/learn/updating-arrays-in-state.md
astropsy999 Jul 28, 2024
50da71b
Update src/content/learn/updating-arrays-in-state.md
astropsy999 Jul 28, 2024
342d67b
Update src/content/learn/updating-arrays-in-state.md
astropsy999 Jul 28, 2024
4e07ce9
Update src/content/learn/updating-arrays-in-state.md
astropsy999 Jul 28, 2024
03566bb
Update src/content/learn/updating-arrays-in-state.md
astropsy999 Jul 28, 2024
9167f25
Update src/content/learn/updating-arrays-in-state.md
astropsy999 Jul 28, 2024
a494e23
Update src/content/learn/updating-arrays-in-state.md
astropsy999 Jul 28, 2024
3723395
Finished translating Choosing the state structure
viperehonchuk Jul 30, 2024
5783238
Replace links to MDN with links to WebDoky
viperehonchuk Jul 30, 2024
06bc228
Add links replacement to TRANSLATION.md
viperehonchuk Aug 1, 2024
6671ba7
Document behaviour of setting state inside `useLayoutEffect` (#7096)
OliverJAsh Aug 7, 2024
2bfa7a6
Update compiler docs installation instructions (#7095)
poteto Aug 8, 2024
4f6cafc
Move links replacing section to top
alinkedd Aug 9, 2024
12b6428
Update src/content/learn/index.md
alinkedd Aug 9, 2024
3d0ded8
Update src/content/learn/conditional-rendering.md
alinkedd Aug 9, 2024
5477f79
Merge pull request #558 from undead404/webdoky-links
alinkedd Aug 9, 2024
8020bde
Merge branch 'main' into updating-arrays-in-state
astropsy999 Aug 11, 2024
2974040
Translated sidebar title + suggested changes
astropsy999 Aug 11, 2024
1785506
Merge branch 'main' of https://github.com/reactjs/react.dev into sync…
react-translations-bot Aug 12, 2024
4d3a9c3
Merge pull request #559 from reactjs/sync-2bfa7a62
alinkedd Aug 12, 2024
5cb3270
Apply suggestions from code review
alinkedd Aug 14, 2024
c92aef2
Merge pull request #553 from astropsy999/updating-arrays-in-state
alinkedd Aug 14, 2024
138f2a1
useContext.md finished
astropsy999 Aug 18, 2024
669e6e3
minor corrections
astropsy999 Aug 18, 2024
a220bb3
docs: replace check mark emoji to check mark button emoji (#7121)
k35o Aug 22, 2024
b5f28b4
Redirect lists-and-keys to rendering-lists describing key (#7120)
BartoszKlonowski Aug 23, 2024
7d50c3f
Emphasize the second problem paragraph with chain of effects example …
BartoszKlonowski Aug 25, 2024
7227663
merging all conflicts
react-translations-bot Aug 26, 2024
b237707
Resolve merge conflicts
alinkedd Aug 26, 2024
aeae19e
Merge pull request #563 from reactjs/sync-7d50c3ff
alinkedd Aug 26, 2024
50004fa
Adds React Advanced London 2024 (#7127)
PixelsCommander Aug 26, 2024
40d7349
Parallel structure
sophiebits Aug 29, 2024
c2d6131
Fix typo 'bulit' -> 'built' (#7138)
tveastman Sep 1, 2024
5ad1c79
Merge branch 'main' of https://github.com/reactjs/react.dev into sync…
react-translations-bot Sep 2, 2024
391dadb
Fix typos in lazy.md and cache.md (#7141)
kihyeoon Sep 2, 2024
c171aca
Merge pull request #565 from reactjs/sync-c2d61310
alinkedd Sep 2, 2024
cd923d6
Update conferences.md to move the past conferences lower (#7130)
JiashengWu Sep 6, 2024
2c06272
add React Day Berlin 2024 to conferences.md (#7137)
McFrid Sep 6, 2024
60ef58c
Update conferences.md, add conference (#7135)
OlegKomissarov Sep 6, 2024
9aa2e36
Changed the documentation of the subscribe argument to a more accurat…
Tinttori Sep 8, 2024
d7bff81
Merge branch 'main' of https://github.com/reactjs/react.dev into sync…
react-translations-bot Sep 9, 2024
0335488
Merge pull request #566 from reactjs/sync-9aa2e366
alinkedd Sep 9, 2024
0f2284d
Update copyright footer (#7152)
kassens Sep 9, 2024
e25e5ec
Apply suggestions from code review
astropsy999 Sep 11, 2024
febc1f9
Merge branch 'reactjs:main' into useContext
astropsy999 Sep 11, 2024
ab98dee
Apply suggestions from code review
astropsy999 Sep 14, 2024
3bddb13
Apply suggestions from code review
astropsy999 Sep 14, 2024
27dc07b
Merge branch 'main' of https://github.com/reactjs/react.dev into sync…
react-translations-bot Sep 16, 2024
13a73c1
Update the version 3 (#7161)
imparth7 Sep 16, 2024
505c85d
Update you-might-not-need-an-effect.md (#7169)
harish-sethuraman Sep 17, 2024
e2e148d
Merge pull request #568 from reactjs/sync-0f2284dd
alinkedd Sep 17, 2024
4ecbf27
Merge pull request #560 from astropsy999/useContext
alinkedd Sep 17, 2024
39abc60
Nit: server actions can't be passed events (#7175)
rickhanlonii Sep 19, 2024
c003ac4
Add stable fn notes to useMemo, useTransition, useState, and useReduc…
rickhanlonii Sep 22, 2024
975930f
Merge branch 'main' of https://github.com/reactjs/react.dev into sync…
react-translations-bot Sep 23, 2024
e2f089d
Fix search results ranking and grouping (#7183)
rickhanlonii Sep 23, 2024
ec8f70f
rm insights prop to unbreak main
rickhanlonii Sep 23, 2024
8e6e81e
rm package-lock.json (#7184)
rickhanlonii Sep 23, 2024
8dba319
reactjsday-2024-Verona (#7171)
lxmarinkovic Sep 24, 2024
a4b66b5
Merge pull request #569 from reactjs/sync-c003ac4e
alinkedd Sep 25, 2024
2dacc43
Finished translatio of Profiler page
GeorgeShvab Sep 1, 2024
cd46f61
Update src/content/reference/react/Profiler.md
alinkedd Sep 29, 2024
d25b51b
Merge pull request #564 from GeorgeShvab/uk-translation-profiler
alinkedd Sep 29, 2024
fe37c42
✨KOREAN(ko.react.dev) Translation Completed (#7185)
lumirlumir Sep 29, 2024
bcd79e4
Merge branch 'main' of https://github.com/reactjs/react.dev into sync…
react-translations-bot Sep 30, 2024
7e59348
Replace defunct placeKitten calls with loremFlicker and placeCat call…
pauljones0 Sep 30, 2024
a506983
chore(docs): fix typo (#7194)
bnzone Sep 30, 2024
8a62ce3
Add files via upload (#7182)
premdood Sep 30, 2024
ae9726a
Docs: Fix typos in thinking-in-react.md (#7179)
rammba Sep 30, 2024
6d2f337
Add React Native London Conf to the community conferences (#7173)
mojavad Sep 30, 2024
d418485
fix:#7158 issue (#7159)
imparth7 Sep 30, 2024
c7392cb
docs(act.md): correct ReactDOM to ReactDOMClient (#7156)
regchiu Sep 30, 2024
4436422
chore(typo): Fix comment to match code (#7147)
ssan93 Sep 30, 2024
7a8e256
Fix minor grammar issue in tutorial-tic-tac-toe.md (`a` to `an`) (#7136)
FarisPalayi Sep 30, 2024
4fe9c85
remove wrong reference of window (#7132)
youngvform Sep 30, 2024
8fee25f
Update renderToPipeableStream.md (#7131)
segmentationfaulter Sep 30, 2024
0f92834
fix: add missing blank lines between import statements and code block…
dev-satoshi Sep 30, 2024
ca2051f
fix: `@testing-library/react-native` links (#7124)
shubh73 Sep 30, 2024
d6df8eb
Add React Osaka to meetups (#7100)
martinheidegger Sep 30, 2024
d5aaa72
doc: Add missing return statement (#7081)
cst9221 Sep 30, 2024
589a1d3
doc: fix typo in updating-objects-in-state.md (#7077)
Rekl0w Sep 30, 2024
374075b
Merge pull request #570 from reactjs/sync-fe37c42e
alinkedd Sep 30, 2024
56b3832
Use correct link for translations progress site (#7199)
rammba Oct 1, 2024
1697ae8
fix: remove broken links in community/meetups (#7205)
juliogarciape Oct 3, 2024
d2dabab
Merge branch 'main' of https://github.com/reactjs/react.dev into sync…
react-translations-bot Oct 7, 2024
bb38630
Add react-compiler-runtime instructions to compiler docs (#7213)
poteto Oct 7, 2024
2b2d0f2
`useActionState` pending example (#6989)
JakeSaterlay Oct 8, 2024
406a565
Merge pull request #571 from reactjs/sync-1697ae89
alinkedd Oct 9, 2024
038360e
Merge branch 'main' of https://github.com/reactjs/react.dev into sync…
react-translations-bot Oct 14, 2024
2bd6189
Capitalize "Effect" (#7211)
smikitky Oct 14, 2024
4334feb
Merge pull request #572 from reactjs/sync-2b2d0f23
alinkedd Oct 15, 2024
ee09492
[compiler] Move React 17/18 section to its own subheading (#7230)
poteto Oct 17, 2024
9467bc5
[compiler] Add docs for Beta (#7231)
poteto Oct 18, 2024
4ff1a6b
Merge branch 'main' of https://github.com/reactjs/react.dev into sync…
react-translations-bot Oct 21, 2024
8f6d6a9
[compiler] Remove section on healthcheck (#7239)
poteto Oct 21, 2024
d9e650f
Add React Compiler Beta Release post (#7240)
poteto Oct 21, 2024
e2b2b90
Fix capitalization of eslint (#7241)
poteto Oct 21, 2024
a3656c2
Add atproto-did (#7242)
rickhanlonii Oct 21, 2024
1bda70a
Add link to eslint configuration in compiler blog post (#7244)
poteto Oct 22, 2024
4d88cbe
Merge pull request #573 from reactjs/sync-9467bc58
alinkedd Oct 23, 2024
e628e5d
Add ESLint flat config example, fix ESLint name (#7246)
karlhorky Oct 23, 2024
eb174dd
Update components-and-hooks-must-be-pure.md (#7245)
Sanderand Oct 23, 2024
cd9b1e0
Merge branch 'main' of https://github.com/reactjs/react.dev into sync…
react-translations-bot Oct 28, 2024
62a1883
Merge pull request #574 from reactjs/sync-eb174dd9
alinkedd Oct 28, 2024
b4b33c4
Replace contributors dead link (#7272)
ynshung Nov 2, 2024
75e4d40
Add Bluesky as profile link option to team page + footer (#7273)
gaearon Nov 2, 2024
ab51439
Add poteto bsky (#7276)
poteto Nov 3, 2024
8201e7e
[ci] Speed up CI (#7277)
poteto Nov 3, 2024
d354d81
Merge branch 'main' of https://github.com/reactjs/react.dev into sync…
react-translations-bot Nov 4, 2024
80f14b2
Merge pull request #575 from reactjs/sync-8201e7e9
alinkedd Nov 4, 2024
b214f78
Update socials for Josh Story (#7282)
gnoff Nov 8, 2024
0562a26
Merge branch 'main' of https://github.com/reactjs/react.dev into sync…
react-translations-bot Nov 11, 2024
3246989
Compiler: Update link to Expo documentation (#7288)
Simek Nov 12, 2024
f0c2b53
Merge pull request #576 from reactjs/sync-b214f784
alinkedd Nov 13, 2024
891b20c
Update socials for Josh Story (#7290)
gnoff Nov 13, 2024
1d1767f
fix: broken link of react-compiler reference to nextjs docs (#7285)
golamrabbiazad Nov 14, 2024
84f29eb
Update React 19 Upgrade Guide with pre-warming change (#7292)
rickhanlonii Nov 14, 2024
987573a
Merge branch 'main' of https://github.com/reactjs/react.dev into sync…
react-translations-bot Nov 18, 2024
ab2487b
Merge pull request #577 from reactjs/sync-84f29eb2
alinkedd Nov 19, 2024
6a35e13
Update react-19-upgrade-guide.md
sophiebits Dec 2, 2024
4bae717
Fix typo in react-19-upgrade-guide.md
sophiebits Dec 2, 2024
fd8b1e0
Update React v19 blog post for stable release (#7321)
rickhanlonii Dec 5, 2024
4673a05
Merge v19 docs to main (#7322)
rickhanlonii Dec 5, 2024
d6f3659
update version label
rickhanlonii Dec 5, 2024
d2536c0
fix vv19
rickhanlonii Dec 5, 2024
8235ae9
Fix types install instructions in 19 upgrade guide
eps1lon Dec 5, 2024
4d7cc91
Update Versions page (#7324)
rickhanlonii Dec 5, 2024
ebedc89
fix links to prerender docs (#7323)
mayank99 Dec 5, 2024
acda167
Add compiler beta release to Version changelog
rickhanlonii Dec 5, 2024
69edd84
fixed typo in yarn add command (#7326)
JakeSaterlay Dec 5, 2024
ed36905
merging all conflicts
react-translations-bot Dec 9, 2024
bba9579
Resolve conflicts
alinkedd Dec 10, 2024
aedafbd
Merge pull request #578 from reactjs/sync-69edd845
alinkedd Dec 10, 2024
3b02f82
Update React DevTools docs to reference RN DevTools (#7355)
huntie Dec 11, 2024
9fb491d
Fix troubleshooting links in startTransition reference (#7367)
jimmycallin Dec 16, 2024
51864f6
(fix): mismatch href bug (#7368)
ahm3tozenir Dec 16, 2024
bc93f05
Fix stylesheet precedence example (#7235)
EricCote Dec 16, 2024
07eca83
Fix intro of prerenderToNodeStream (#7356)
smikitky Dec 16, 2024
c92bad2
chore: several major typo fixes (#7362)
coalio Dec 16, 2024
d3bd0f9
Update act.md (#7363)
huiliangShen Dec 16, 2024
31456db
chore: correct typo in useTransition docs (#7366)
AminDannak Dec 16, 2024
d4d1683
chore: fix a typo in startTransition docs (#7361)
AminDannak Dec 16, 2024
04ba43c
fix: add link to prop-type codemod (#7344)
renbaoshuo Dec 16, 2024
4349dd5
fix: anchor (#7343)
Jealh-h Dec 16, 2024
d3cde8f
Fix "won't break between majors" (#7357)
smikitky Dec 16, 2024
37e1ce9
Add React Summit 2025 to conferences.md; move past conferences to the…
McFrid Dec 16, 2024
4b5ce91
Add missing react-error-boundary dependency (#7353)
acusti Dec 16, 2024
0805613
fix broken link in use server (#7351)
simon300000 Dec 16, 2024
a4b6074
fix: page does not exist (#7348)
nusr Dec 16, 2024
807e7fa
Mention that uncontrolled form elements are reset by form actions (#7…
jeremy-deutsch Dec 16, 2024
0f8bd80
Code example mistake in useMemo page (#7335)
JZZICK Dec 16, 2024
3558095
docs: include React 19 blog post in sidebarBlog.json (#7331)
slorber Dec 16, 2024
93a03f1
docs: Fix broken link to next.js Suspense docs (#7318)
ethshea Dec 16, 2024
204b3f1
Remove canary flag from useFormStatus (#7349)
smikitky Dec 16, 2024
8ac5531
Rename remaining "Server Actions" (#7352)
smikitky Dec 16, 2024
9985199
docs[compiler]: clarify React DevTools support for Compiler Badges in…
piotrski Dec 16, 2024
c37fdd3
Remove forwardref from useImperativeHandle docs (#7360)
SebassNoob Dec 16, 2024
e2bba41
docs: fix readme node version (#7316)
devwqc Dec 16, 2024
8a5526e
Update lauren (#7373)
poteto Dec 17, 2024
03e74dd
Add info about App.js 2025 conference (#7154)
piaskowyk Dec 18, 2024
8e41e32
Inline stylesheets are not Suspensey yet (#7378)
eps1lon Dec 19, 2024
1517494
refactor: remove unused useTransition import in App.js and update doc…
Rekl0w Dec 19, 2024
6ae99dd
Remove forwardRef references from useRef and Manipulating the DOM wit…
mattcarrollcode Dec 20, 2024
fce1e2b
merging all conflicts
react-translations-bot Dec 23, 2024
c0d3656
Resolve merge conflicts
alinkedd Dec 23, 2024
6f7ce9a
Merge pull request #580 from reactjs/sync-6ae99ddd
alinkedd Dec 23, 2024
852556d
Finished translating Choosing the state structure
viperehonchuk Jul 30, 2024
e4ce887
Merge branch 'translate-choosing-the-state-structure' of github.com:u…
viperehonchuk Dec 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 16 additions & 8 deletions .github/workflows/analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,26 @@ jobs:
analyze:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up node
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: yarn
cache-dependency-path: yarn.lock

- name: Install dependencies
uses: bahmutov/[email protected]
- name: Restore cached node_modules
uses: actions/cache@v4
with:
path: "**/node_modules"
key: node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}

- name: Install deps
run: yarn install --frozen-lockfile

- name: Restore next build
uses: actions/cache@v2
uses: actions/cache@v4
id: restore-build-cache
env:
cache-name: cache-next-build
Expand All @@ -41,7 +49,7 @@ jobs:
run: npx -p [email protected] report

- name: Upload bundle
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
path: .next/analyze/__bundle_analysis.json
name: bundle_analysis.json
Expand Down Expand Up @@ -73,7 +81,7 @@ jobs:
run: ls -laR .next/analyze/base && npx -p nextjs-bundle-analysis compare

- name: Upload analysis comment
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: analysis_comment.txt
path: .next/analyze/__bundle_analysis_comment.txt
Expand All @@ -82,7 +90,7 @@ jobs:
run: echo ${{ github.event.number }} > ./pr_number

- name: Upload PR number
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: pr_number
path: ./pr_number
Expand Down
16 changes: 12 additions & 4 deletions .github/workflows/site_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,22 @@ jobs:
name: Lint on node 20.x and ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: yarn
cache-dependency-path: yarn.lock

- name: Install deps and build (with cache)
uses: bahmutov/[email protected]
- name: Restore cached node_modules
uses: actions/cache@v4
with:
path: "**/node_modules"
key: node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}

- name: Install deps
run: yarn install --frozen-lockfile

- name: Lint codebase
run: yarn ci-check
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This repo contains the source code and documentation powering [uk.react.dev](htt
### Prerequisites

1. Git
1. Node: any 12.x version starting with v12.0.0 or greater
1. Node: any version starting with v16.8.0 or greater
1. Yarn: See [Yarn website for installation instructions](https://yarnpkg.com/lang/en/docs/install/)
1. A fork of the repo (for any contributions)
1. A clone of the [uk.react.dev repo](https://github.com/reactjs/uk.react.dev) on your local machine
Expand Down
12 changes: 12 additions & 0 deletions TRANSLATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@
- Вичитуйте тексти, що перекладені за допомогою зовнішніх сервісів (Google Translate, ChatGPT тощо).
- Якщо український відповідник є рідковживаним або має декілька значень, то краще залишити після нього оригінальне слово у дужках, щоб полегшити розуміння читачем.

### Заміна посилань

Потрібно замінювати посилання на матеріал англійською посиланням на його переклад українською, якщо такий переклад існує. Нижче наведена таблиця вебсайтів, що мають українські відповідники, де варто шукати заміну зовнішнім посиланням.

| Оригінальний сайт | Варіант українською |
| --------------------- | ------------------- |
| en.wikipedia.org | uk.wikipedia.org |
| javascript.info | uk.javascript.info |
| developer.mozilla.org | webdoky.org |

Цей список не є вичерпним.

## Процес перевірки перекладу

1. Мейнтейнер переглядає усі змінені файли PR'у.
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
},
"dependencies": {
"@codesandbox/sandpack-react": "2.13.5",
"@docsearch/css": "3.0.0-alpha.41",
"@docsearch/react": "3.0.0-alpha.41",
"@docsearch/css": "^3.6.1",
"@docsearch/react": "^3.6.1",
"@headlessui/react": "^1.7.0",
"@radix-ui/react-context-menu": "^2.1.5",
"body-scroll-lock": "^3.1.3",
Expand Down
1 change: 1 addition & 0 deletions public/.well-known/atproto-did
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
did:plc:uorpbnp2q32vuvyeruwauyhe
Binary file added public/images/docs/diagrams/prerender.dark.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 public/images/docs/diagrams/prerender.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 public/images/docs/diagrams/prewarm.dark.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 public/images/docs/diagrams/prewarm.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 public/images/team/lauren.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions src/components/Icon/IconBsky.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/

import {memo} from 'react';

export const IconBsky = memo<JSX.IntrinsicElements['svg']>(function IconBsky(
props
) {
return (
<svg
aria-label="Bluesky"
viewBox="0 0 16 16"
height="1.25em"
width="1.25em"
fill="currentColor"
xmlns="http://www.w3.org/2000/svg"
{...props}>
<path
className="x19hqcy"
d="M3.468 1.948C5.303 3.325 7.276 6.118 8 7.616c.725-1.498 2.697-4.29 4.532-5.668C13.855.955 16 .186 16 2.632c0 .489-.28 4.105-.444 4.692-.572 2.04-2.653 2.561-4.504 2.246 3.236.551 4.06 2.375 2.281 4.2-3.376 3.464-4.852-.87-5.23-1.98-.07-.204-.103-.3-.103-.218 0-.081-.033.014-.102.218-.379 1.11-1.855 5.444-5.231 1.98-1.778-1.825-.955-3.65 2.28-4.2-1.85.315-3.932-.205-4.503-2.246C.28 6.737 0 3.12 0 2.632 0 .186 2.145.955 3.468 1.948Z"></path>
</svg>
);
});
32 changes: 32 additions & 0 deletions src/components/Icon/IconRocket.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/

import {memo} from 'react';

export const IconRocket = memo<
JSX.IntrinsicElements['svg'] & {title?: string; size?: 's' | 'md'}
>(function IconRocket({className, size = 'md'}) {
return (
<svg
className={className}
aria-hidden="true"
width={size === 's' ? '1.2em' : '1.5em'}
height={size === 's' ? '1.2em' : '1.5em'}
fill="currentColor"
version="1.1"
viewBox="0 0 1200 1200"
xmlns="http://www.w3.org/2000/svg">
<g fillRule="evenodd">
<path d="m911.8 288.2c65.051 65.051 65.051 170.6 0 235.65-65.051 65.051-170.6 65.051-235.65 0-65.051-65.051-65.051-170.6 0-235.65 65.051-65.051 170.6-65.051 235.65 0zm-53.051 53.051c-35.75-35.801-93.801-35.801-129.55 0-35.801 35.75-35.801 93.801 0 129.55 35.75 35.801 93.801 35.801 129.55 0 35.801-35.75 35.801-93.801 0-129.55z" />
<path d="m1122.2 103.4s96.648 328.1-194.4 619.1c-130.75 130.75-303.25 226.75-440.75 250.5-12.102 2.0508-24.449-1.8984-33.102-10.648l-231.55-234.8c-8.6484-8.8008-12.449-21.301-10.102-33.398 26.102-135.4 135.45-292.2 265.2-421.95 291-291.05 619.1-194.4 619.1-194.4 12.352 3.6016 22 13.25 25.602 25.602zm-67.5 41.898c-70.898-12.898-308.6-35.602-524.15 179.9-112.35 112.35-210.4 245.4-240.4 364.25 0 0 203.05 205.9 203.1 205.9 121.75-26.852 268.4-112.75 381.55-225.9 215.5-215.55 192.8-453.25 179.9-524.15z" />
<path d="m151.55 543.85 124 20.648c20.398 3.3984 34.25 22.75 30.801 43.148-3.3984 20.449-22.699 34.25-43.148 30.852l-144.35-24.051c-22.148-3.6992-40.699-18.949-48.602-40-7.9492-21.051-4.0508-44.699 10.199-62.148l122.85-150.15c15.051-18.398 36.898-30 60.551-32.148l179.55-16.301c20.602-1.8984 38.852 13.352 40.75 33.949 1.8516 20.602-13.352 38.852-33.949 40.75l-179.55 16.301c-3.6484 0.35156-7 2.1016-9.3008 4.9492z" />
<path d="m656.15 1048.4 134.2-109.8c2.8516-2.3008 4.6016-5.6484 4.9492-9.3008l16.301-179.55c1.8984-20.602 20.148-35.801 40.75-33.949 20.602 1.8984 35.852 20.148 33.949 40.75l-16.301 179.55c-2.1484 23.648-13.75 45.5-32.148 60.551l-150.15 122.85c-17.449 14.25-41.102 18.148-62.148 10.199-21.051-7.8984-36.301-26.449-40-48.602l-29.25-175.7c-3.3984-20.398 10.398-39.75 30.801-43.148 20.449-3.3984 39.75 10.449 43.148 30.852l25.898 155.3z" />
<path d="m310.9 560.4c-14.648-14.648-14.648-38.398 0-53.051 14.648-14.648 38.398-14.648 53.051 0l328.7 328.7c14.648 14.648 14.648 38.398 0 53.051-14.648 14.648-38.398 14.648-53.051 0z" />
<path d="m383.95 982.15c14.648-14.602 38.398-14.602 53.051 0 14.602 14.648 14.602 38.398 0 53.051l-91.352 91.301c-14.602 14.648-38.398 14.648-53 0-14.648-14.602-14.648-38.398 0-53z" />
<path d="m237.85 909.1c14.648-14.602 38.398-14.602 53.051 0 14.602 14.648 14.602 38.398 0 53.051l-127.85 127.85c-14.648 14.648-38.398 14.648-53.051 0-14.648-14.648-14.648-38.398 0-53.051z" />
<path d="m164.8 763c14.648-14.602 38.398-14.602 53.051 0 14.602 14.648 14.602 38.398 0 53.051l-91.352 91.301c-14.602 14.648-38.398 14.648-53 0-14.648-14.602-14.648-38.398 0-53z" />
</g>
</svg>
);
});
9 changes: 8 additions & 1 deletion src/components/Layout/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import cn from 'classnames';
import {ExternalLink} from 'components/ExternalLink';
import {IconFacebookCircle} from 'components/Icon/IconFacebookCircle';
import {IconTwitter} from 'components/Icon/IconTwitter';
import {IconBsky} from 'components/Icon/IconBsky';
import {IconGitHub} from 'components/Icon/IconGitHub';

export function Footer() {
Expand Down Expand Up @@ -283,7 +284,7 @@ export function Footer() {
<div
className="text-xs text-left rtl:text-right mt-2 pe-0.5"
dir="ltr">
&copy;{new Date().getFullYear()}
Copyright &copy; Meta Platforms, Inc
</div>
<div
className="uwu-visible text-xs cursor-pointer hover:text-link hover:dark:text-link-dark hover:underline"
Expand Down Expand Up @@ -370,6 +371,12 @@ export function Footer() {
className={socialLinkClasses}>
<IconTwitter />
</ExternalLink>
<ExternalLink
aria-label="React on Bluesky"
href="https://bsky.app/profile/react.dev"
className={socialLinkClasses}>
<IconBsky />
</ExternalLink>
<ExternalLink
aria-label="React on Github"
href="https://github.com/facebook/react"
Expand Down
15 changes: 11 additions & 4 deletions src/components/Layout/Sidebar/SidebarLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ interface SidebarLinkProps {
selected?: boolean;
title: string;
level: number;
canary?: boolean;
version?: 'canary' | 'major';
icon?: React.ReactNode;
isExpanded?: boolean;
hideArrow?: boolean;
Expand All @@ -27,7 +27,7 @@ export function SidebarLink({
href,
selected = false,
title,
canary,
version,
level,
isExpanded,
hideArrow,
Expand Down Expand Up @@ -75,10 +75,17 @@ export function SidebarLink({
{/* This here needs to be refactored ofc */}
<div>
{title}{' '}
{canary && (
{version === 'major' && (
<span
title="- This feature is available in React 19 beta and the React canary channel"
className={`text-xs px-1 ms-1 rounded bg-gray-10 dark:bg-gray-40 dark:bg-opacity-20 text-gray-40 dark:text-gray-40`}>
React 19
</span>
)}
{version === 'canary' && (
<IconCanary
title=" - This feature is available in the latest Canary"
className="ms-2 text-gray-30 dark:text-gray-60 inline-block w-4 h-4 align-[-3px]"
className="ms-1 text-gray-30 dark:text-gray-60 inline-block w-3.5 h-3.5 align-[-3px]"
/>
)}
</div>
Expand Down
6 changes: 3 additions & 3 deletions src/components/Layout/Sidebar/SidebarRouteTree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export function SidebarRouteTree({
path,
title,
routes,
canary,
version,
heading,
hasSectionHeader,
sectionHeader,
Expand Down Expand Up @@ -121,7 +121,7 @@ export function SidebarRouteTree({
selected={selected}
level={level}
title={title}
canary={canary}
version={version}
isExpanded={isExpanded}
hideArrow={isForceExpanded}
/>
Expand All @@ -145,7 +145,7 @@ export function SidebarRouteTree({
selected={selected}
level={level}
title={title}
canary={canary}
version={version}
/>
</li>
);
Expand Down
4 changes: 2 additions & 2 deletions src/components/Layout/getRouteMeta.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export type RouteTag =
export interface RouteItem {
/** Page title (for the sidebar) */
title: string;
/** Optional canary flag for heading */
canary?: boolean;
/** Optional version flag for heading */
version?: 'canary' | 'major';
/** Optional page description for heading */
description?: string;
/* Additional meta info for page tagging */
Expand Down
4 changes: 2 additions & 2 deletions src/components/MDX/Diagram.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ interface DiagramProps {

function Caption({text}: {text: string}) {
return (
<div className="w-full table">
<figcaption className="p-1 sm:p-2 mt-0 sm:mt-0 text-gray-40 text-base lg:text-lg text-center leading-tight table-caption">
<div className="w-full flex justify-center">
<figcaption className="p-1 sm:p-2 mt-0 sm:mt-0 text-gray-40 text-base lg:text-lg text-center leading-tight table-caption max-w-lg">
{text}
</figcaption>
</div>
Expand Down
34 changes: 30 additions & 4 deletions src/components/MDX/ExpandableCallout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,16 @@ import {IconNote} from '../Icon/IconNote';
import {IconWarning} from '../Icon/IconWarning';
import {IconPitfall} from '../Icon/IconPitfall';
import {IconCanary} from '../Icon/IconCanary';
import {IconRocket} from '../Icon/IconRocket';

type CalloutVariants = 'deprecated' | 'pitfall' | 'note' | 'wip' | 'canary';
type CalloutVariants =
| 'deprecated'
| 'pitfall'
| 'note'
| 'wip'
| 'canary'
| 'major'
| 'rsc';

interface ExpandableCalloutProps {
children: React.ReactNode;
Expand Down Expand Up @@ -59,6 +67,22 @@ const variantMap = {
overlayGradient:
'linear-gradient(rgba(249, 247, 243, 0), rgba(249, 247, 243, 1)',
},
major: {
title: 'React 19',
Icon: IconRocket,
containerClasses: 'bg-blue-10 dark:bg-blue-60 dark:bg-opacity-20',
textColor: 'text-blue-50 dark:text-blue-40',
overlayGradient:
'linear-gradient(rgba(249, 247, 243, 0), rgba(249, 247, 243, 1)',
},
rsc: {
title: 'React Server Components',
Icon: null,
containerClasses: 'bg-blue-10 dark:bg-blue-60 dark:bg-opacity-20',
textColor: 'text-blue-50 dark:text-blue-40',
overlayGradient:
'linear-gradient(rgba(249, 247, 243, 0), rgba(249, 247, 243, 1)',
},
};

function ExpandableCallout({children, type = 'note'}: ExpandableCalloutProps) {
Expand All @@ -72,9 +96,11 @@ function ExpandableCallout({children, type = 'note'}: ExpandableCalloutProps) {
variant.containerClasses
)}>
<h3 className={cn('text-2xl font-display font-bold', variant.textColor)}>
<variant.Icon
className={cn('inline me-3 mb-1 text-lg', variant.textColor)}
/>
{variant.Icon && (
<variant.Icon
className={cn('inline me-2 mb-1 text-lg', variant.textColor)}
/>
)}
{variant.title}
</h3>
<div className="relative">
Expand Down
Loading
Loading