Skip to content

Commit 23c78c5

Browse files
Merge branch 'main' of https://github.com/reactjs/react.dev into sync-b12743c3
2 parents 5cc8891 + b12743c commit 23c78c5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1035
-119
lines changed

colors.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module.exports = {
1111
tertiary: '#5E687E', // gray-50
1212
'tertiary-dark': '#99A1B3', // gray-30
1313
link: '#087EA4', // blue-50
14-
'link-dark': '#149ECA', // blue-40
14+
'link-dark': '#58C4DC', // blue-40
1515
syntax: '#EBECF0', // gray-10
1616
wash: '#FFFFFF',
1717
'wash-dark': '#23272F', // gray-90
@@ -23,6 +23,8 @@ module.exports = {
2323
'border-dark': '#343A46', // gray-80
2424
'secondary-button': '#EBECF0', // gray-10
2525
'secondary-button-dark': '#404756', // gray-70
26+
brand: '#087EA4', // blue-40
27+
'brand-dark': '#58C4DC', // blue-40
2628

2729
// Gray
2830
'gray-95': '#16181D',

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
"webpack-bundle-analyzer": "^4.5.0"
9999
},
100100
"engines": {
101-
"node": "^16.8.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0"
101+
"node": ">=16.8.0"
102102
},
103103
"nextBundleAnalysis": {
104104
"budget": null,

public/android-chrome-192x192.png

5.86 KB
Loading

public/android-chrome-384x384.png

28.3 KB
Loading

public/android-chrome-512x512.png

69.6 KB
Loading

public/apple-touch-icon.png

5.54 KB
Loading

public/browserconfig.xml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<browserconfig>
3+
<msapplication>
4+
<tile>
5+
<square150x150logo src="/mstile-150x150.png"/>
6+
<TileColor>#2b5797</TileColor>
7+
</tile>
8+
</msapplication>
9+
</browserconfig>

public/favicon-16x16.png

872 Bytes
Loading

public/favicon-32x32.png

1.63 KB
Loading

public/favicon.ico

10.5 KB
Binary file not shown.

public/favicon_old.ico

15 KB
Binary file not shown.

public/images/uwu.png

2.43 KB
Loading

public/mstile-150x150.png

6.01 KB
Loading

public/safari-pinned-tab.svg

+60
Loading

public/site.webmanifest

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"name": "React",
3+
"short_name": "React",
4+
"icons": [
5+
{
6+
"src": "/android-chrome-192x192.png",
7+
"sizes": "192x192",
8+
"type": "image/png"
9+
},
10+
{
11+
"src": "/android-chrome-384x384.png",
12+
"sizes": "384x384",
13+
"type": "image/png"
14+
}
15+
],
16+
"theme_color": "#23272f",
17+
"background_color": "#23272f",
18+
"display": "standalone"
19+
}

src/components/ButtonLink.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ function ButtonLink({
2626
className,
2727
'active:scale-[.98] transition-transform inline-flex font-bold items-center outline-none focus:outline-none focus-visible:outline focus-visible:outline-link focus:outline-offset-2 focus-visible:dark:focus:outline-link-dark leading-snug',
2828
{
29-
'bg-link text-white hover:bg-opacity-80': type === 'primary',
29+
'bg-link text-white dark:bg-brand-dark dark:text-secondary hover:bg-opacity-80':
30+
type === 'primary',
3031
'text-primary dark:text-primary-dark shadow-secondary-button-stroke dark:shadow-secondary-button-stroke-dark hover:bg-gray-40/5 active:bg-gray-40/10 hover:dark:bg-gray-60/5 active:dark:bg-gray-60/10':
3132
type === 'secondary',
3233
'text-lg py-3 rounded-full px-4 sm:px-6': size === 'lg',

src/components/Layout/HomeContent.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export function HomeContent() {
129129
</div>
130130
<Logo
131131
className={cn(
132-
'uwu-hidden mt-4 mb-3 text-link dark:text-link-dark w-24 lg:w-28 self-center text-sm me-0 flex origin-center transition-all ease-in-out'
132+
'uwu-hidden mt-4 mb-3 text-brand dark:text-brand-dark w-24 lg:w-28 self-center text-sm me-0 flex origin-center transition-all ease-in-out'
133133
)}
134134
/>
135135
<h1 className="uwu-hidden text-5xl font-display lg:text-6xl self-center flex font-semibold leading-snug text-primary dark:text-primary-dark">
@@ -509,7 +509,7 @@ export function HomeContent() {
509509
src="/images/uwu.png"
510510
/>
511511
</div>
512-
<Logo className="uwu-hidden text-link dark:text-link-dark w-24 lg:w-28 mb-10 lg:mb-8 mt-12 h-auto mx-auto self-start" />
512+
<Logo className="uwu-hidden text-brand dark:text-brand-dark w-24 lg:w-28 mb-10 lg:mb-8 mt-12 h-auto mx-auto self-start" />
513513
<Header>
514514
Welcome to the <br className="hidden lg:inline" />
515515
React community
@@ -1640,7 +1640,7 @@ function Thumbnail({video}) {
16401640
</div>
16411641
<div className="mt-1">
16421642
<span className="inline-flex text-xs font-normal items-center text-primary-dark py-1 whitespace-nowrap outline-link px-1.5 rounded-lg">
1643-
<Logo className="text-xs me-1 w-4 h-4 text-link-dark" />
1643+
<Logo className="text-xs me-1 w-4 h-4 text-brand text-brand-dark" />
16441644
React Conf
16451645
</span>
16461646
</div>

src/components/Layout/Page.tsx

+3-33
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,9 @@ import {useRouter} from 'next/router';
88
import {SidebarNav} from './SidebarNav';
99
import {Footer} from './Footer';
1010
import {Toc} from './Toc';
11-
import SocialBanner from '../SocialBanner';
11+
// import SocialBanner from '../SocialBanner';
1212
import {DocsPageFooter} from 'components/DocsFooter';
1313
import {Seo} from 'components/Seo';
14-
import ButtonLink from 'components/ButtonLink';
15-
import {IconNavArrow} from 'components/Icon/IconNavArrow';
1614
import PageHeading from 'components/PageHeading';
1715
import {getRouteMeta} from './getRouteMeta';
1816
import {TocContext} from '../MDX/TocContext';
@@ -105,12 +103,10 @@ export function Page({
105103
let hasColumns = true;
106104
let showSidebar = true;
107105
let showToc = true;
108-
let showSurvey = true;
109106
if (isHomePage || isBlogIndex) {
110107
hasColumns = false;
111108
showSidebar = false;
112109
showToc = false;
113-
showSurvey = false;
114110
} else if (section === 'blog') {
115111
showToc = false;
116112
hasColumns = false;
@@ -141,7 +137,7 @@ export function Page({
141137
/>
142138
</Head>
143139
)}
144-
<SocialBanner />
140+
{/*<SocialBanner />*/}
145141
<TopNav
146142
section={section}
147143
routeTree={routeTree}
@@ -178,33 +174,7 @@ export function Page({
178174
)}>
179175
{!isHomePage && (
180176
<div className="w-full px-5 pt-10 mx-auto sm:px-12 md:px-12 md:pt-12 lg:pt-10">
181-
{
182-
<hr className="mx-auto max-w-7xl border-border dark:border-border-dark" />
183-
}
184-
{showSurvey && (
185-
<>
186-
<div className="flex flex-col items-center p-4 m-4">
187-
<p className="mb-4 text-lg font-bold text-primary dark:text-primary-dark">
188-
How do you like these docs?
189-
</p>
190-
<div>
191-
<ButtonLink
192-
href="https://www.surveymonkey.co.uk/r/PYRPF3X"
193-
className="mt-1"
194-
type="primary"
195-
size="md"
196-
target="_blank">
197-
Take our survey!
198-
<IconNavArrow
199-
displayDirection="end"
200-
className="inline ms-1"
201-
/>
202-
</ButtonLink>
203-
</div>
204-
</div>
205-
<hr className="mx-auto max-w-7xl border-border dark:border-border-dark" />
206-
</>
207-
)}
177+
<hr className="mx-auto max-w-7xl border-border dark:border-border-dark" />
208178
</div>
209179
)}
210180
<div

src/components/Layout/TopNav/TopNav.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ function NavItem({url, isActive, children}: any) {
125125
<Link
126126
href={url}
127127
className={cn(
128-
'active:scale-95 transition-transform w-full text-center outline-link py-1.5 px-1.5 xs:px-3 sm:px-4 rounded-full capitalize',
128+
'active:scale-95 transition-transform w-full text-center outline-link py-1.5 px-1.5 xs:px-3 sm:px-4 rounded-full capitalize whitespace-nowrap',
129129
!isActive && 'hover:bg-primary/5 hover:dark:bg-primary-dark/5',
130130
isActive &&
131131
'bg-highlight dark:bg-highlight-dark text-link dark:text-link-dark'
@@ -282,7 +282,7 @@ export default function TopNav({
282282
className={`active:scale-95 overflow-hidden transition-transform relative items-center text-primary dark:text-primary-dark p-1 whitespace-nowrap outline-link rounded-full 3xl:rounded-xl inline-flex text-lg font-normal gap-2`}>
283283
<Logo
284284
className={cn(
285-
'text-sm me-0 w-10 h-10 text-link dark:text-link-dark flex origin-center transition-all ease-in-out'
285+
'text-sm me-0 w-10 h-10 text-brand dark:text-brand-dark flex origin-center transition-all ease-in-out'
286286
)}
287287
/>
288288
<span className="sr-only 3xl:not-sr-only">React</span>

src/components/PageHeading.tsx

-6
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ function PageHeading({
2222
title,
2323
status,
2424
canary,
25-
description,
2625
tags = [],
2726
breadcrumbs,
2827
}: PageHeadingProps) {
@@ -40,11 +39,6 @@ function PageHeading({
4039
)}
4140
{status ? <em>{status}</em> : ''}
4241
</H1>
43-
{description && (
44-
<p className="mt-4 mb-6 dark:text-primary-dark text-xl text-primary leading-large">
45-
{description}
46-
</p>
47-
)}
4842
{tags?.length > 0 && (
4943
<div className="mt-4">
5044
{tags.map((tag) => (

src/content/blog/2022/03/29/react-v18.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ With Strict Mode in React 18, React will simulate unmounting and remounting the
240240
241241
#### useTransition {/*usetransition*/}
242242

243-
`useTransition` and `startTransition` let you mark some state updates as not urgent. Other state updates are considered urgent by default. React will allow urgent state updates (for example, updating a text input) to interrupt non-urgent state updates (for example, rendering a list of search results). [See docs here](/reference/react/useTransition)
243+
`useTransition` and `startTransition` let you mark some state updates as not urgent. Other state updates are considered urgent by default. React will allow urgent state updates (for example, updating a text input) to interrupt non-urgent state updates (for example, rendering a list of search results). [See docs here](/reference/react/useTransition).
244244

245245
#### useDeferredValue {/*usedeferredvalue*/}
246246

src/content/blog/2022/06/15/react-labs-what-we-have-been-working-on-june-2022.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,6 @@ We are working on a new version for the Interaction Tracing API (tentatively cal
7777

7878
Last year, we announced the beta version of the new React documentation website ([later shipped as react.dev](/blog/2023/03/16/introducing-react-dev)) of the new React documentation website. The new learning materials teach Hooks first and has new diagrams, illustrations, as well as many interactive examples and challenges. We took a break from that work to focus on the React 18 release, but now that React 18 is out, we’re actively working to finish and ship the new documentation.
7979

80-
We are currently writing a detailed section about effects, as we’ve heard that is one of the more challenging topics for both new and experienced React users. [Synchronizing with Effects](/learn/synchronizing-with-effects) is the first published page in the series, and there are more to come in the following weeks. When we first started writing a detailed section about effects, we’ve realized that many common effect patterns can be simplified by adding a new primitive to React. We’ve shared some initial thoughts on that in the [useEvent RFC](https://github.com/reactjs/rfcs/pull/220). It is currently in early research, and we are still iterating on the idea. We appreciate the community’s comments on the RFC so far, as well as the [feedback](https://github.com/reactjs/reactjs.org/issues/3308) and contributions to the ongoing documentation rewrite. We’d specifically like to thank [Harish Kumar](https://github.com/harish-sethuraman) for submitting and reviewing many improvements to the new website implementation.
80+
We are currently writing a detailed section about effects, as we’ve heard that is one of the more challenging topics for both new and experienced React users. [Synchronizing with Effects](/learn/synchronizing-with-effects) is the first published page in the series, and there are more to come in the following weeks. When we first started writing a detailed section about effects, we’ve realized that many common effect patterns can be simplified by adding a new primitive to React. We’ve shared some initial thoughts on that in the [useEvent RFC](https://github.com/reactjs/rfcs/pull/220). It is currently in early research, and we are still iterating on the idea. We appreciate the community’s comments on the RFC so far, as well as the [feedback](https://github.com/reactjs/react.dev/issues/3308) and contributions to the ongoing documentation rewrite. We’d specifically like to thank [Harish Kumar](https://github.com/harish-sethuraman) for submitting and reviewing many improvements to the new website implementation.
8181

8282
*Thanks to [Sophie Alpert](https://twitter.com/sophiebits) for reviewing this blog post!*

src/content/blog/2023/03/16/introducing-react-dev.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ We hope that this approach will make the API reference useful not only as a way
613613

614614
## What's next? {/*whats-next*/}
615615

616-
That's a wrap for our little tour! Have a look around the new website, see what you like or don't like, and keep the feedback coming in the [anonymous survey](https://www.surveymonkey.co.uk/r/PYRPF3X) or in our [issue tracker](https://github.com/reactjs/reactjs.org/issues).
616+
That's a wrap for our little tour! Have a look around the new website, see what you like or don't like, and keep the feedback coming in our [issue tracker](https://github.com/reactjs/react.dev/issues).
617617

618618
We acknowledge this project has taken a long time to ship. We wanted to maintain a high quality bar that the React community deserves. While writing these docs and creating all of the examples, we found mistakes in some of our own explanations, bugs in React, and even gaps in the React design that we are now working to address. We hope that the new documentation will help us hold React itself to a higher bar in the future.
619619

0 commit comments

Comments
 (0)