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 @ 6fc98fff #1134

Closed
wants to merge 24 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
517c0fa
/errors: Empty args are not missing arguments (#6767)
eps1lon Jan 13, 2025
855ce23
Upgrade to React 19, Next 15.1 and enable React Compiler (#6996)
mattcarrollcode Jan 13, 2025
316230a
Update React compiler and install eslint plugin (#7428)
poteto Jan 13, 2025
ee8a829
Disallow `/index.html` in sandboxes (#7430)
eps1lon Jan 14, 2025
a2d4932
Update Conferences Lists for 2025 (#7406)
apherio Jan 15, 2025
b22cbc3
Update Dan Abramov's broken Twitter link to bsky.app across multiple …
hichemfantar Jan 15, 2025
ee361b5
Update React Paris conference year to 2025 (#7439)
mikedidomizio Jan 21, 2025
e88e3d0
React Native Connection is back in 2025 (#7311)
viteinfinite Jan 21, 2025
b03017a
fix typo (#7440)
slavgetov Jan 21, 2025
c140d2c
Update conferences.md for CityJS Athens and London Events (#7425)
arismarko Jan 22, 2025
7cdbed0
Mention startTransition in useActionState docs (#7448)
sophiebits Jan 24, 2025
07f13ab
[ci] Add workflow to label PRs from core team (#7451)
poteto Jan 24, 2025
2f24839
[ci] Specify is_remote input to maintainer check workflow (#7453)
poteto Jan 24, 2025
a5aad0d
[ci] Update discord notification bot to use remote workflow (#7455)
poteto Jan 24, 2025
4d44167
import missing useState in the useEffect markdown file (#7457)
SruthiKrish19 Jan 27, 2025
066b6c1
bumped up the versions of docsearch packages (#7458)
phanendraguptha Jan 27, 2025
9001bc6
docs: Correct var reference in prerender example (#7434)
rschristian Jan 27, 2025
305db5f
Capitalized Suspense in a few files (#7449)
renatodellosso Jan 27, 2025
ef705c7
Update Eli's github username on the team page (#7460)
elicwhite Jan 27, 2025
3bb7a4e
Team page updates (#7438)
rickhanlonii Jan 27, 2025
0eb0f88
feat: migrate React.dev to the App Router (#7437)
feedthejim Feb 1, 2025
af0358f
Revert "feat: migrate React.dev to the App Router (#7437)" (#7466)
gaearon Feb 1, 2025
6fc98ff
Fix Vite URLs (#7462)
karlhorky Feb 2, 2025
3e35f81
merging all conflicts
react-translations-bot Feb 3, 2025
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
8 changes: 5 additions & 3 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
"root": true,
"extends": "next/core-web-vitals",
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"plugins": ["@typescript-eslint", "eslint-plugin-react-compiler"],
"rules": {
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["error", { "varsIgnorePattern": "^_" }],
"react-hooks/exhaustive-deps": "error"
"@typescript-eslint/no-unused-vars": ["error", {"varsIgnorePattern": "^_"}],
"react-hooks/exhaustive-deps": "error",
"react/no-unknown-property": ["error", {"ignore": ["meta"]}],
"react-compiler/react-compiler": "error"
},
"env": {
"node": true,
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/discord_notify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,15 @@ on:
types: [labeled]

jobs:
check_maintainer:
uses: facebook/react/.github/workflows/shared_check_maintainer.yml@main
with:
actor: ${{ github.event.pull_request.user.login }}
is_remote: true

notify:
if: ${{ github.event.label.name == 'React Core Team' }}
if: ${{ needs.check_maintainer.outputs.is_core_team == 'true' }}
needs: check_maintainer
runs-on: ubuntu-latest
steps:
- name: Discord Webhook Action
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/label_core_team_prs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Label Core Team PRs

on:
pull_request_target:

env:
TZ: /usr/share/zoneinfo/America/Los_Angeles
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#cache-segment-restore-timeout
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1

jobs:
check_maintainer:
uses: facebook/react/.github/workflows/shared_check_maintainer.yml@main
with:
actor: ${{ github.event.pull_request.user.login }}
is_remote: true

label:
if: ${{ needs.check_maintainer.outputs.is_core_team == 'true' }}
runs-on: ubuntu-latest
needs: check_maintainer
steps:
- name: Label PR as React Core Team
uses: actions/github-script@v7
with:
script: |
github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: ${{ github.event.number }},
labels: ['React Core Team']
});
2 changes: 1 addition & 1 deletion next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://nextjs.org/docs/pages/api-reference/config/typescript for more information.
4 changes: 1 addition & 3 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ const nextConfig = {
pageExtensions: ['jsx', 'js', 'ts', 'tsx', 'mdx', 'md'],
reactStrictMode: true,
experimental: {
// TODO: Remove after https://github.com/vercel/next.js/issues/49355 is fixed
appDir: false,
scrollRestoration: true,
legacyBrowsers: false,
reactCompiler: true,
},
env: {},
webpack: (config, {dev, isServer, ...options}) => {
Expand Down
35 changes: 26 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"ci-check": "npm-run-all prettier:diff --parallel lint tsc lint-heading-ids rss lint-editorconfig",
"tsc": "tsc --noEmit",
"start": "next start",
"postinstall": "patch-package && (is-ci || husky install .husky)",
"postinstall": "is-ci || husky install .husky",
"check-all": "npm-run-all prettier lint:fix tsc rss",
"rss": "node scripts/generateRss.js",
"cache-reset": "rm -rf node_modules/.cache && rm -rf .next && yarn cache clean",
Expand All @@ -28,21 +28,21 @@
},
"dependencies": {
"@codesandbox/sandpack-react": "2.13.5",
"@docsearch/css": "^3.6.1",
"@docsearch/react": "^3.6.1",
"@docsearch/css": "^3.8.3",
"@docsearch/react": "^3.8.3",
"@headlessui/react": "^1.7.0",
"@radix-ui/react-context-menu": "^2.1.5",
"body-scroll-lock": "^3.1.3",
"classnames": "^2.2.6",
"date-fns": "^2.16.1",
"debounce": "^1.2.1",
"github-slugger": "^1.3.0",
"next": "^13.4.1",
"next": "15.1.0",
"next-remote-watch": "^1.0.0",
"parse-numeric-range": "^1.2.0",
"react": "^0.0.0-experimental-16d053d59-20230506",
"react": "^19.0.0",
"react-collapsed": "4.0.4",
"react-dom": "^0.0.0-experimental-16d053d59-20230506",
"react-dom": "^19.0.0",
"remark-frontmatter": "^4.0.1",
"remark-gfm": "^3.0.1"
},
Expand All @@ -58,21 +58,26 @@
"@types/mdx-js__react": "^1.5.2",
"@types/node": "^14.6.4",
"@types/parse-numeric-range": "^0.0.1",
"@types/react": "^18.0.9",
"@types/react-dom": "^18.0.5",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@typescript-eslint/eslint-plugin": "^5.36.2",
"@typescript-eslint/parser": "^5.36.2",
"asyncro": "^3.0.0",
"autoprefixer": "^10.4.2",
"babel-eslint": "10.x",
<<<<<<< HEAD
"editorconfig-checker": "^6.0.0",
=======
"babel-plugin-react-compiler": "19.0.0-beta-e552027-20250112",
>>>>>>> 6fc98fffdaad3b84e6093d1eb8def8f2cedeee16
"eslint": "7.x",
"eslint-config-next": "12.0.3",
"eslint-config-react-app": "^5.2.1",
"eslint-plugin-flowtype": "4.x",
"eslint-plugin-import": "2.x",
"eslint-plugin-jsx-a11y": "6.x",
"eslint-plugin-react": "7.x",
"eslint-plugin-react-compiler": "^19.0.0-beta-e552027-20250112",
"eslint-plugin-react-hooks": "^0.0.0-experimental-fabef7a6b-20221215",
"fs-extra": "^9.0.1",
"globby": "^11.0.1",
Expand All @@ -84,7 +89,6 @@
"metro-cache": "0.72.2",
"mocha": "^10.6.0",
"npm-run-all": "^4.1.5",
"patch-package": "^6.2.2",
"postcss": "^8.4.5",
"postcss-flexbugs-fixes": "4.2.1",
"postcss-preset-env": "^6.7.0",
Expand All @@ -100,11 +104,15 @@
"retext-smartypants": "^4.0.0",
"rss": "^1.2.2",
"tailwindcss": "^3.4.1",
<<<<<<< HEAD
"textlint": "^14.0.4",
"textlint-filter-rule-comments": "^1.2.2",
"textlint-rule-allowed-uris": "^1.0.7",
"textlint-tester": "^14.0.4",
"typescript": "^4.0.2",
=======
"typescript": "^5.7.2",
>>>>>>> 6fc98fffdaad3b84e6093d1eb8def8f2cedeee16
"unist-util-visit": "^2.0.3",
"webpack-bundle-analyzer": "^4.5.0"
},
Expand All @@ -115,5 +123,14 @@
"budget": null,
"budgetPercentIncreaseRed": 10,
"showDetails": true
<<<<<<< HEAD
}
=======
},
"lint-staged": {
"*.{js,ts,jsx,tsx,css}": "yarn prettier",
"src/**/*.md": "yarn fix-headings"
},
"packageManager": "[email protected]"
>>>>>>> 6fc98fffdaad3b84e6093d1eb8def8f2cedeee16
}
22 changes: 0 additions & 22 deletions patches/next+13.4.1.patch

This file was deleted.

16 changes: 0 additions & 16 deletions patches/next-remote-watch+1.0.0.patch

This file was deleted.

Binary file removed public/images/team/andrey-lunyov.jpg
Binary file not shown.
Binary file added public/images/team/hendrik.jpg
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/team/jordan.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/images/team/kathryn-middleton.jpg
Binary file not shown.
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.
Binary file removed public/images/team/luna-wei.jpg
Binary file not shown.
Binary file added public/images/team/mike.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/images/team/noahlemen.jpg
Binary file not shown.
Binary file added public/images/team/pieter.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/images/team/sam.jpg
Binary file not shown.
Binary file removed public/images/team/sathya.jpg
Binary file not shown.
Binary file removed public/images/team/tianyu.jpg
Binary file not shown.
6 changes: 5 additions & 1 deletion src/components/ExternalLink.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/
import type {DetailedHTMLProps, AnchorHTMLAttributes} from 'react';

export function ExternalLink({
href,
target,
children,
...props
}: JSX.IntrinsicElements['a']) {
}: DetailedHTMLProps<
AnchorHTMLAttributes<HTMLAnchorElement>,
HTMLAnchorElement
>) {
return (
<a href={href} target={target ?? '_blank'} rel="noopener" {...props}>
{children}
Expand Down
3 changes: 2 additions & 1 deletion src/components/Icon/IconArrow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@

import {memo} from 'react';
import cn from 'classnames';
import type {SVGProps} from 'react';

export const IconArrow = memo<
JSX.IntrinsicElements['svg'] & {
SVGProps<SVGSVGElement> & {
/**
* The direction the arrow should point.
* `start` and `end` are relative to the current locale.
Expand Down
3 changes: 2 additions & 1 deletion src/components/Icon/IconArrowSmall.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@

import {memo} from 'react';
import cn from 'classnames';
import type {SVGProps} from 'react';

export const IconArrowSmall = memo<
JSX.IntrinsicElements['svg'] & {
SVGProps<SVGSVGElement> & {
/**
* The direction the arrow should point.
* `start` and `end` are relative to the current locale.
Expand Down
5 changes: 2 additions & 3 deletions src/components/Icon/IconBsky.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
*/

import {memo} from 'react';
import type {SVGProps} from 'react';

export const IconBsky = memo<JSX.IntrinsicElements['svg']>(function IconBsky(
props
) {
export const IconBsky = memo<SVGProps<SVGSVGElement>>(function IconBsky(props) {
return (
<svg
aria-label="Bluesky"
Expand Down
3 changes: 2 additions & 1 deletion src/components/Icon/IconClose.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
*/

import {memo} from 'react';
import type {SVGProps} from 'react';

export const IconClose = memo<JSX.IntrinsicElements['svg']>(function IconClose(
export const IconClose = memo<SVGProps<SVGSVGElement>>(function IconClose(
props
) {
return (
Expand Down
3 changes: 2 additions & 1 deletion src/components/Icon/IconFacebookCircle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
*/

import {memo} from 'react';
import type {SVGProps} from 'react';

export const IconFacebookCircle = memo<JSX.IntrinsicElements['svg']>(
export const IconFacebookCircle = memo<SVGProps<SVGSVGElement>>(
function IconFacebookCircle(props) {
return (
<svg
Expand Down
31 changes: 16 additions & 15 deletions src/components/Icon/IconGitHub.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,20 @@
*/

import {memo} from 'react';
import type {SVGProps} from 'react';

export const IconGitHub = memo<JSX.IntrinsicElements['svg']>(
function IconGitHub(props) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width="1.5em"
height="1.5em"
viewBox="0 -2 24 24"
fill="currentColor"
{...props}>
<path d="M10 0a10 10 0 0 0-3.16 19.49c.5.1.68-.22.68-.48l-.01-1.7c-2.78.6-3.37-1.34-3.37-1.34-.46-1.16-1.11-1.47-1.11-1.47-.9-.62.07-.6.07-.6 1 .07 1.53 1.03 1.53 1.03.9 1.52 2.34 1.08 2.91.83.1-.65.35-1.09.63-1.34-2.22-.25-4.55-1.11-4.55-4.94 0-1.1.39-1.99 1.03-2.69a3.6 3.6 0 0 1 .1-2.64s.84-.27 2.75 1.02a9.58 9.58 0 0 1 5 0c1.91-1.3 2.75-1.02 2.75-1.02.55 1.37.2 2.4.1 2.64.64.7 1.03 1.6 1.03 2.69 0 3.84-2.34 4.68-4.57 4.93.36.31.68.92.68 1.85l-.01 2.75c0 .26.18.58.69.48A10 10 0 0 0 10 0"></path>
</svg>
);
}
);
export const IconGitHub = memo<SVGProps<SVGSVGElement>>(function IconGitHub(
props
) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width="1.5em"
height="1.5em"
viewBox="0 -2 24 24"
fill="currentColor"
{...props}>
<path d="M10 0a10 10 0 0 0-3.16 19.49c.5.1.68-.22.68-.48l-.01-1.7c-2.78.6-3.37-1.34-3.37-1.34-.46-1.16-1.11-1.47-1.11-1.47-.9-.62.07-.6.07-.6 1 .07 1.53 1.03 1.53 1.03.9 1.52 2.34 1.08 2.91.83.1-.65.35-1.09.63-1.34-2.22-.25-4.55-1.11-4.55-4.94 0-1.1.39-1.99 1.03-2.69a3.6 3.6 0 0 1 .1-2.64s.84-.27 2.75 1.02a9.58 9.58 0 0 1 5 0c1.91-1.3 2.75-1.02 2.75-1.02.55 1.37.2 2.4.1 2.64.64.7 1.03 1.6 1.03 2.69 0 3.84-2.34 4.68-4.57 4.93.36.31.68.92.68 1.85l-.01 2.75c0 .26.18.58.69.48A10 10 0 0 0 10 0"></path>
</svg>
);
});
3 changes: 2 additions & 1 deletion src/components/Icon/IconHamburger.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
*/

import {memo} from 'react';
import type {SVGProps} from 'react';

export const IconHamburger = memo<JSX.IntrinsicElements['svg']>(
export const IconHamburger = memo<SVGProps<SVGSVGElement>>(
function IconHamburger(props) {
return (
<svg
Expand Down
3 changes: 2 additions & 1 deletion src/components/Icon/IconInstagram.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
*/

import {memo} from 'react';
import type {SVGProps} from 'react';

export const IconInstagram = memo<JSX.IntrinsicElements['svg']>(
export const IconInstagram = memo<SVGProps<SVGSVGElement>>(
function IconInstagram(props) {
return (
<svg
Expand Down
5 changes: 2 additions & 3 deletions src/components/Icon/IconLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
*/

import {memo} from 'react';
import type {SVGProps} from 'react';

export const IconLink = memo<JSX.IntrinsicElements['svg']>(function IconLink(
props
) {
export const IconLink = memo<SVGProps<SVGSVGElement>>(function IconLink(props) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
Expand Down
Loading
Loading