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

Sync with react.dev @ c3bc5aff #54

Open
wants to merge 41 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
a2f8ff3
fix brand colors (#6826)
rickhanlonii May 1, 2024
a6450b9
Update uwu logo (#6827)
poteto May 2, 2024
e69ec58
rm survey and fix old links (#6828)
rickhanlonii May 2, 2024
d4a9a76
Fix typo in server-components.md (#6829)
seanWLawrence May 3, 2024
0e1ff1a
Fix React 19 upgrade guide typo (#6830)
Ryczko May 3, 2024
556063b
Add a redirect entry for feed.xml => rss.xml (#6836)
flexdinesh May 5, 2024
1fa2057
Update react-19.md (#6838)
HomyeeKing May 6, 2024
46437c2
Add missing period to React v18.0 blog post (#6842)
jackspiva May 7, 2024
0b9ae66
Add docs for useRef no no (#6846)
rickhanlonii May 9, 2024
f1b0f86
Fix typo on tutorial-tic-tac-toe.md (#6843)
skoryky May 10, 2024
f9b9b66
Fix #6852: navigation link fix (#6853)
Rekl0w May 10, 2024
4f1d985
Update synchronizing-with-effects.md (#6856)
segmentationfaulter May 10, 2024
b7bf6c1
Fix Node.js version update at `package.json` (#6855)
Rekl0w May 10, 2024
a81e415
Change React dependency version in <form> page fix (#6858)
includerajat May 13, 2024
f053b53
Update team.md: Jason Bonta (#6862)
jbonta May 14, 2024
e0c667f
Add React Compiler Docs (#6869)
rickhanlonii May 15, 2024
fa19b7f
compiler playground link
jbonta May 15, 2024
8d69e6e
Clearer rule severity for React Compiler eslint plugin (#6870)
SpanishPear May 16, 2024
4e3d63a
Fix typos in React Compiler guide (#6875)
denniskigen May 17, 2024
3a46a6e
Update instructions for setting up the React Compiler in Next.js (#6877)
timneutkens May 17, 2024
70a7b64
Update export of next.config.js (#6878)
timneutkens May 17, 2024
ee068ac
Update separating-events-from-effects.md (#6880)
officialkidmax May 19, 2024
8bb3eb3
Fix typo (spreadsheet => stylesheet) (#6750)
smikitky May 19, 2024
e7c52aa
add frontend nation conference (#6866)
danielkellyio May 19, 2024
9967ded
Fix the order of the returns of useActionState (#6864)
yousefelgoharyx May 19, 2024
0dc72f6
Rm dupe blog description (#6885)
rickhanlonii May 20, 2024
05c9d77
typo: spell check (#6892)
TheRakeshPurohit May 21, 2024
bc43b95
End ReactConf banner (#6893)
rickhanlonii May 21, 2024
beefa06
docs: format src/content/blog/2024/04/25/react-19.md (#6883)
kiner-tang May 21, 2024
80d30d7
navitem-css-change (#6888)
ohe1013 May 21, 2024
adb3bed
Update react-compiler docs (#6898)
poteto May 21, 2024
4eb0850
fixed typo in synchronizing-with-effects.md (#6899)
emmanueposu May 22, 2024
59a2739
Add React Conf 2024 Recap post (#6886)
rickhanlonii May 22, 2024
f055f8f
Fix recap blog video links (#6902)
rickhanlonii May 22, 2024
bb96306
Add codemods to upgrade guide (#6897)
rickhanlonii May 23, 2024
68c0f85
s/beta/rc (#6906)
rickhanlonii May 23, 2024
a25bd4b
Clarify precedence is arbitrary valued (#6908)
gnoff May 23, 2024
69b95a6
Add /warnings/version-mismatch (#6909)
rickhanlonii May 24, 2024
ef23197
Clarify useEffect caveats (#6910)
rickhanlonii May 24, 2024
c3bc5af
FIX: Typo in useEffect.md caveats (#6911)
rachitiitr May 25, 2024
ae1ecc8
Merge branch 'main' of https://github.com/reactjs/react.dev into sync…
react-translations-bot May 27, 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
4 changes: 3 additions & 1 deletion colors.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = {
tertiary: '#5E687E', // gray-50
'tertiary-dark': '#99A1B3', // gray-30
link: '#087EA4', // blue-50
'link-dark': '#149ECA', // blue-40
'link-dark': '#58C4DC', // blue-40
syntax: '#EBECF0', // gray-10
wash: '#FFFFFF',
'wash-dark': '#23272F', // gray-90
Expand All @@ -23,6 +23,8 @@ module.exports = {
'border-dark': '#343A46', // gray-80
'secondary-button': '#EBECF0', // gray-10
'secondary-button-dark': '#404756', // gray-70
brand: '#087EA4', // blue-40
'brand-dark': '#58C4DC', // blue-40

// Gray
'gray-95': '#16181D',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
"webpack-bundle-analyzer": "^4.5.0"
},
"engines": {
"node": "^16.8.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0"
"node": ">=16.8.0"
},
"nextBundleAnalysis": {
"budget": null,
Expand Down
Binary file added public/android-chrome-192x192.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/android-chrome-384x384.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/android-chrome-512x512.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/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/browserconfig.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square150x150logo src="/mstile-150x150.png"/>
<TileColor>#2b5797</TileColor>
</tile>
</msapplication>
</browserconfig>
Binary file added public/favicon-16x16.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/favicon-32x32.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/favicon.ico
Binary file not shown.
Binary file added public/favicon_old.ico
Binary file not shown.
Binary file modified public/images/uwu.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/mstile-150x150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
60 changes: 60 additions & 0 deletions public/safari-pinned-tab.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions public/site.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "React",
"short_name": "React",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-384x384.png",
"sizes": "384x384",
"type": "image/png"
}
],
"theme_color": "#23272f",
"background_color": "#23272f",
"display": "standalone"
}
3 changes: 2 additions & 1 deletion src/components/ButtonLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ function ButtonLink({
className,
'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',
{
'bg-link text-white hover:bg-opacity-80': type === 'primary',
'bg-link text-white dark:bg-brand-dark dark:text-secondary hover:bg-opacity-80':
type === 'primary',
'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':
type === 'secondary',
'text-lg py-3 rounded-full px-4 sm:px-6': size === 'lg',
Expand Down
6 changes: 3 additions & 3 deletions src/components/Layout/HomeContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export function HomeContent() {
</div>
<Logo
className={cn(
'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'
'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'
)}
/>
<h1 className="uwu-hidden text-5xl font-display lg:text-6xl self-center flex font-semibold leading-snug text-primary dark:text-primary-dark">
Expand Down Expand Up @@ -509,7 +509,7 @@ export function HomeContent() {
src="/images/uwu.png"
/>
</div>
<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" />
<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" />
<Header>
Welcome to the <br className="hidden lg:inline" />
React community
Expand Down Expand Up @@ -1640,7 +1640,7 @@ function Thumbnail({video}) {
</div>
<div className="mt-1">
<span className="inline-flex text-xs font-normal items-center text-primary-dark py-1 whitespace-nowrap outline-link px-1.5 rounded-lg">
<Logo className="text-xs me-1 w-4 h-4 text-link-dark" />
<Logo className="text-xs me-1 w-4 h-4 text-brand text-brand-dark" />
React Conf
</span>
</div>
Expand Down
36 changes: 3 additions & 33 deletions src/components/Layout/Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@ import {useRouter} from 'next/router';
import {SidebarNav} from './SidebarNav';
import {Footer} from './Footer';
import {Toc} from './Toc';
import SocialBanner from '../SocialBanner';
// import SocialBanner from '../SocialBanner';
import {DocsPageFooter} from 'components/DocsFooter';
import {Seo} from 'components/Seo';
import ButtonLink from 'components/ButtonLink';
import {IconNavArrow} from 'components/Icon/IconNavArrow';
import PageHeading from 'components/PageHeading';
import {getRouteMeta} from './getRouteMeta';
import {TocContext} from '../MDX/TocContext';
Expand Down Expand Up @@ -105,12 +103,10 @@ export function Page({
let hasColumns = true;
let showSidebar = true;
let showToc = true;
let showSurvey = true;
if (isHomePage || isBlogIndex) {
hasColumns = false;
showSidebar = false;
showToc = false;
showSurvey = false;
} else if (section === 'blog') {
showToc = false;
hasColumns = false;
Expand Down Expand Up @@ -141,7 +137,7 @@ export function Page({
/>
</Head>
)}
<SocialBanner />
{/*<SocialBanner />*/}
<TopNav
section={section}
routeTree={routeTree}
Expand Down Expand Up @@ -178,33 +174,7 @@ export function Page({
)}>
{!isHomePage && (
<div className="w-full px-5 pt-10 mx-auto sm:px-12 md:px-12 md:pt-12 lg:pt-10">
{
<hr className="mx-auto max-w-7xl border-border dark:border-border-dark" />
}
{showSurvey && (
<>
<div className="flex flex-col items-center p-4 m-4">
<p className="mb-4 text-lg font-bold text-primary dark:text-primary-dark">
How do you like these docs?
</p>
<div>
<ButtonLink
href="https://www.surveymonkey.co.uk/r/PYRPF3X"
className="mt-1"
type="primary"
size="md"
target="_blank">
Take our survey!
<IconNavArrow
displayDirection="end"
className="inline ms-1"
/>
</ButtonLink>
</div>
</div>
<hr className="mx-auto max-w-7xl border-border dark:border-border-dark" />
</>
)}
<hr className="mx-auto max-w-7xl border-border dark:border-border-dark" />
</div>
)}
<div
Expand Down
4 changes: 2 additions & 2 deletions src/components/Layout/TopNav/TopNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ function NavItem({url, isActive, children}: any) {
<Link
href={url}
className={cn(
'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',
'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',
!isActive && 'hover:bg-primary/5 hover:dark:bg-primary-dark/5',
isActive &&
'bg-highlight dark:bg-highlight-dark text-link dark:text-link-dark'
Expand Down Expand Up @@ -282,7 +282,7 @@ export default function TopNav({
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`}>
<Logo
className={cn(
'text-sm me-0 w-10 h-10 text-link dark:text-link-dark flex origin-center transition-all ease-in-out'
'text-sm me-0 w-10 h-10 text-brand dark:text-brand-dark flex origin-center transition-all ease-in-out'
)}
/>
<span className="sr-only 3xl:not-sr-only">React</span>
Expand Down
6 changes: 0 additions & 6 deletions src/components/PageHeading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ function PageHeading({
title,
status,
canary,
description,
tags = [],
breadcrumbs,
}: PageHeadingProps) {
Expand All @@ -40,11 +39,6 @@ function PageHeading({
)}
{status ? <em>—{status}</em> : ''}
</H1>
{description && (
<p className="mt-4 mb-6 dark:text-primary-dark text-xl text-primary leading-large">
{description}
</p>
)}
{tags?.length > 0 && (
<div className="mt-4">
{tags.map((tag) => (
Expand Down
2 changes: 1 addition & 1 deletion src/content/blog/2022/03/29/react-v18.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ With Strict Mode in React 18, React will simulate unmounting and remounting the

#### useTransition {/*usetransition*/}

`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)
`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).

#### useDeferredValue {/*usedeferredvalue*/}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,6 @@ We are working on a new version for the Interaction Tracing API (tentatively cal

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.

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.
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.

*Thanks to [Sophie Alpert](https://twitter.com/sophiebits) for reviewing this blog post!*
2 changes: 1 addition & 1 deletion src/content/blog/2023/03/16/introducing-react-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ We hope that this approach will make the API reference useful not only as a way

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

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

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.

Expand Down
Loading
Loading