Skip to content

Commit 9379102

Browse files
merging all conflicts
2 parents db8e3a6 + 2859efa commit 9379102

File tree

319 files changed

+18985
-6389
lines changed

Some content is hidden

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

319 files changed

+18985
-6389
lines changed

Diff for: .env.production

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
NEXT_PUBLIC_GA_TRACKING_ID = 'UA-41298772-4'
1+
NEXT_PUBLIC_GA_TRACKING_ID = 'G-B1E83PJ3RT'

Diff for: .eslintrc

+5-3
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
"root": true,
33
"extends": "next/core-web-vitals",
44
"parser": "@typescript-eslint/parser",
5-
"plugins": ["@typescript-eslint"],
5+
"plugins": ["@typescript-eslint", "eslint-plugin-react-compiler"],
66
"rules": {
77
"no-unused-vars": "off",
8-
"@typescript-eslint/no-unused-vars": ["error", { "varsIgnorePattern": "^_" }],
9-
"react-hooks/exhaustive-deps": "error"
8+
"@typescript-eslint/no-unused-vars": ["error", {"varsIgnorePattern": "^_"}],
9+
"react-hooks/exhaustive-deps": "error",
10+
"react/no-unknown-property": ["error", {"ignore": ["meta"]}],
11+
"react-compiler/react-compiler": "error"
1012
},
1113
"env": {
1214
"node": true,

Diff for: .github/ISSUE_TEMPLATE/0-bug.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: "🐛 Report a bug"
2+
description: "Report a problem on the website."
3+
title: "[Bug]: "
4+
labels: ["bug: unconfirmed"]
5+
body:
6+
- type: textarea
7+
attributes:
8+
label: Summary
9+
description: |
10+
A clear and concise summary of what the bug is.
11+
placeholder: |
12+
Example bug report:
13+
When I click the "Submit" button on "Feedback", nothing happens.
14+
validations:
15+
required: true
16+
- type: input
17+
attributes:
18+
label: Page
19+
description: |
20+
What page(s) did you encounter this bug on?
21+
placeholder: |
22+
https://react.dev/
23+
validations:
24+
required: true
25+
- type: textarea
26+
attributes:
27+
label: Details
28+
description: |
29+
Please provide any additional details about the bug.
30+
placeholder: |
31+
Example details:
32+
The "Submit" button is unresponsive. I've tried refreshing the page and using a different browser, but the issue persists.
33+
validations:
34+
required: false

Diff for: .github/ISSUE_TEMPLATE/1-typo.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: "🤦 Typo or mistake"
2+
description: "Report a typo or mistake in the docs."
3+
title: "[Typo]: "
4+
labels: ["type: typos"]
5+
body:
6+
- type: textarea
7+
attributes:
8+
label: Summary
9+
description: |
10+
A clear and concise summary of what the mistake is.
11+
placeholder: |
12+
Example:
13+
The code example on the "useReducer" page includes an unused variable `nextId`.
14+
validations:
15+
required: true
16+
- type: input
17+
attributes:
18+
label: Page
19+
description: |
20+
What page is the typo on?
21+
placeholder: |
22+
https://react.dev/
23+
validations:
24+
required: true
25+
- type: textarea
26+
attributes:
27+
label: Details
28+
description: |
29+
Please provide a explanation for why this is a mistake.
30+
placeholder: |
31+
Example mistake:
32+
In the "useReducer" section of the "API Reference" page, the code example under "Writing a reducer function" includes an unused variable `nextId` that should be removed.
33+
validations:
34+
required: false

Diff for: .github/ISSUE_TEMPLATE/2-suggestion.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: "💡 Suggestions"
2+
description: "Suggest a new page, section, or edit for an existing page."
3+
title: "[Suggestion]: "
4+
labels: ["type: documentation"]
5+
body:
6+
- type: textarea
7+
attributes:
8+
label: Summary
9+
description: |
10+
A clear and concise summary of what we should add.
11+
placeholder: |
12+
Example:
13+
Add a new page for how to use React with TypeScript.
14+
validations:
15+
required: true
16+
- type: input
17+
attributes:
18+
label: Page
19+
description: |
20+
What page is this about?
21+
placeholder: |
22+
https://react.dev/
23+
validations:
24+
required: false
25+
- type: textarea
26+
attributes:
27+
label: Details
28+
description: |
29+
Please provide a explanation for what you're suggesting.
30+
placeholder: |
31+
Example:
32+
I think it would be helpful to have a page that explains how to use React with TypeScript. This could include a basic example of a component written in TypeScript, and a link to the TypeScript documentation.
33+
validations:
34+
required: true

Diff for: .github/ISSUE_TEMPLATE/3-framework.yml

+116
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
name: "📄 Suggest new framework"
2+
description: "I am a framework author applying to be included as a recommended framework."
3+
title: "[Framework]: "
4+
labels: ["type: framework"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
## Apply to be included as a recommended React framework
10+
11+
_This form is for framework authors to apply to be included as a recommended [React framework](https://react.dev/learn/start-a-new-react-project). If you are not a framework author, please contact the authors before submitting._
12+
13+
Our goal when recommending a framework is to start developers with a React project that solves common problems like code splitting, data fetching, routing, and HTML generation without any extra work later. We believe this will allow users to get started quickly with React, and scale their app to production.
14+
15+
While we understand that many frameworks may want to be featured, this page is not a place to advertise every possible React framework or all frameworks that you can add React to. There are many great frameworks that offer support for React that are not listed in our guides. The frameworks we recommend have invested significantly in the React ecosystem, and collaborated with the React team to be compatible with our [full-stack React architecture vision](https://react.dev/learn/start-a-new-react-project#which-features-make-up-the-react-teams-full-stack-architecture-vision).
16+
17+
To be included, frameworks must meet the following criteria:
18+
19+
- **Free & open-source**: must be open source and free to use.
20+
- **Well maintained**. must be actively maintained, providing bug fixes and improvements.
21+
- **Active community**: must have a sufficiently large and active community to support users.
22+
- **Clear onboarding**: must have clear install steps to install the React version of the framework.
23+
- **Ecosystem compatibility**: must support using the full range of libraries and tools in the React ecosystem.
24+
- **Self-hosting option**: must support an option to self-host applications without losing access to features.
25+
- **Developer experience**. must allow developers to be productive by supporting features like Fast Refresh.
26+
- **User experience**. must provide built-in support for common problems like routing and data-fetching.
27+
- **Compatible with our future vision for React**. React evolves over time, and frameworks that do not align with React’s direction risk isolating their users from the main React ecosystem over time. To be included on this page we must feel confident that the framework is setting its users up for success with React over time.
28+
29+
Please note, we have reviewed most of the popular frameworks available today, so it is unlikely we have not considered your framework already. But if you think we missed something, please complete the application below.
30+
- type: input
31+
attributes:
32+
label: Name
33+
description: |
34+
What is the name of your framework?
35+
validations:
36+
required: true
37+
- type: input
38+
attributes:
39+
label: Homepage
40+
description: |
41+
What is the URL of your homepage?
42+
validations:
43+
required: true
44+
- type: input
45+
attributes:
46+
label: Install instructions
47+
description: |
48+
What is the URL of your getting started guide?
49+
validations:
50+
required: true
51+
- type: dropdown
52+
attributes:
53+
label: Is your framework open source?
54+
description: |
55+
We only recommend free and open source frameworks.
56+
options:
57+
- 'No'
58+
- 'Yes'
59+
validations:
60+
required: true
61+
- type: textarea
62+
attributes:
63+
label: Well maintained
64+
description: |
65+
Please describe how your framework is actively maintained. Include recent releases, bug fixes, and improvements as examples.
66+
validations:
67+
required: true
68+
- type: textarea
69+
attributes:
70+
label: Active community
71+
description: |
72+
Please describe your community. Include the size of your community, and links to community resources.
73+
validations:
74+
required: true
75+
- type: textarea
76+
attributes:
77+
label: Clear onboarding
78+
description: |
79+
Please describe how a user can install your framework with React. Include links to any relevant documentation.
80+
validations:
81+
required: true
82+
- type: textarea
83+
attributes:
84+
label: Ecosystem compatibility
85+
description: |
86+
Please describe any limitations your framework has with the React ecosystem. Include any libraries or tools that are not compatible with your framework.
87+
validations:
88+
required: true
89+
- type: textarea
90+
attributes:
91+
label: Self-hosting option
92+
description: |
93+
Please describe how your framework supports self-hosting. Include any limitations to features when self-hosting. Also include whether you require a server to deploy your framework.
94+
validations:
95+
required: true
96+
- type: textarea
97+
attributes:
98+
label: Developer Experience
99+
description: |
100+
Please describe how your framework provides a great developer experience. Include any limitations to React features like React DevTools, Chrome DevTools, and Fast Refresh.
101+
validations:
102+
required: true
103+
- type: textarea
104+
attributes:
105+
label: User Experience
106+
description: |
107+
Please describe how your framework helps developers create high quality user experiences by solving common use-cases. Include specifics for how your framework offers built-in support for code-splitting, routing, HTML generation, and data-fetching in a way that avoids client/server waterfalls by default. Include details on how you offer features such as SSG and SSR.
108+
validations:
109+
required: true
110+
- type: textarea
111+
attributes:
112+
label: Compatible with our future vision for React
113+
description: |
114+
Please describe how your framework aligns with our future vision for React. Include how your framework will evolve with React over time, and your plans to support future React features like React Server Components.
115+
validations:
116+
required: true

Diff for: .github/ISSUE_TEMPLATE/config.yml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
contact_links:
2+
- name: 📃 Bugs in React
3+
url: https://github.com/facebook/react/issues/new/choose
4+
about: This issue tracker is not for bugs in React. Please file React issues here.
5+
- name: 🤔 Questions and Help
6+
url: https://reactjs.org/community/support.html
7+
about: This issue tracker is not for support questions. Please refer to the React community's help and discussion forums.

Diff for: .github/workflows/analyze.yml

+19-9
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,32 @@ on:
77
- main # change this if your default branch is named differently
88
workflow_dispatch:
99

10+
permissions: {}
11+
1012
jobs:
1113
analyze:
1214
runs-on: ubuntu-latest
1315
steps:
14-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v4
1517

1618
- name: Set up node
17-
uses: actions/setup-node@v1
19+
uses: actions/setup-node@v4
1820
with:
1921
node-version: '20.x'
22+
cache: yarn
23+
cache-dependency-path: yarn.lock
24+
25+
- name: Restore cached node_modules
26+
uses: actions/cache@v4
27+
with:
28+
path: '**/node_modules'
29+
key: node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
2030

21-
- name: Install dependencies
22-
uses: bahmutov/npm-install@v1.7.10
31+
- name: Install deps
32+
run: yarn install --frozen-lockfile
2333

2434
- name: Restore next build
25-
uses: actions/cache@v2
35+
uses: actions/cache@v4
2636
id: restore-build-cache
2737
env:
2838
cache-name: cache-next-build
@@ -41,13 +51,13 @@ jobs:
4151
run: npx -p [email protected] report
4252

4353
- name: Upload bundle
44-
uses: actions/upload-artifact@v2
54+
uses: actions/upload-artifact@v4
4555
with:
4656
path: .next/analyze/__bundle_analysis.json
4757
name: bundle_analysis.json
4858

4959
- name: Download base branch bundle stats
50-
uses: dawidd6/action-download-artifact@v2
60+
uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e
5161
if: success() && github.event.number
5262
with:
5363
workflow: analyze.yml
@@ -73,7 +83,7 @@ jobs:
7383
run: ls -laR .next/analyze/base && npx -p nextjs-bundle-analysis compare
7484

7585
- name: Upload analysis comment
76-
uses: actions/upload-artifact@v2
86+
uses: actions/upload-artifact@v4
7787
with:
7888
name: analysis_comment.txt
7989
path: .next/analyze/__bundle_analysis_comment.txt
@@ -82,7 +92,7 @@ jobs:
8292
run: echo ${{ github.event.number }} > ./pr_number
8393

8494
- name: Upload PR number
85-
uses: actions/upload-artifact@v2
95+
uses: actions/upload-artifact@v4
8696
with:
8797
name: pr_number
8898
path: ./pr_number

Diff for: .github/workflows/analyze_comment.yml

+6-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ name: Analyze Bundle (Comment)
22

33
on:
44
workflow_run:
5-
workflows: ["Analyze Bundle"]
5+
workflows: ['Analyze Bundle']
66
types:
77
- completed
88

9+
permissions: {}
10+
911
jobs:
1012
comment:
1113
runs-on: ubuntu-latest
@@ -14,15 +16,15 @@ jobs:
1416
github.event.workflow_run.conclusion == 'success' }}
1517
steps:
1618
- name: Download base branch bundle stats
17-
uses: dawidd6/action-download-artifact@v2
19+
uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e
1820
with:
1921
workflow: analyze.yml
2022
run_id: ${{ github.event.workflow_run.id }}
2123
name: analysis_comment.txt
2224
path: analysis_comment.txt
2325

2426
- name: Download PR number
25-
uses: dawidd6/action-download-artifact@v2
27+
uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e
2628
with:
2729
workflow: analyze.yml
2830
run_id: ${{ github.event.workflow_run.id }}
@@ -48,7 +50,7 @@ jobs:
4850
echo "pr-number=$pr_number" >> $GITHUB_OUTPUT
4951
5052
- name: Comment
51-
uses: marocchino/sticky-pull-request-comment@v2
53+
uses: marocchino/sticky-pull-request-comment@52423e01640425a022ef5fd42c6fb5f633a02728
5254
with:
5355
header: next-bundle-analysis
5456
number: ${{ steps.get-comment-body.outputs.pr-number }}

Diff for: .github/workflows/discord_notify.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Discord Notify
2+
3+
on:
4+
pull_request_target:
5+
types: [opened, ready_for_review]
6+
7+
permissions: {}
8+
9+
jobs:
10+
check_maintainer:
11+
uses: facebook/react/.github/workflows/shared_check_maintainer.yml@main
12+
permissions:
13+
# Used by check_maintainer
14+
contents: read
15+
with:
16+
actor: ${{ github.event.pull_request.user.login }}
17+
18+
notify:
19+
if: ${{ needs.check_maintainer.outputs.is_core_team == 'true' }}
20+
needs: check_maintainer
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Discord Webhook Action
24+
uses: tsickert/[email protected]
25+
with:
26+
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
27+
embed-author-name: ${{ github.event.pull_request.user.login }}
28+
embed-author-url: ${{ github.event.pull_request.user.html_url }}
29+
embed-author-icon-url: ${{ github.event.pull_request.user.avatar_url }}
30+
embed-title: '#${{ github.event.number }} (+${{github.event.pull_request.additions}} -${{github.event.pull_request.deletions}}): ${{ github.event.pull_request.title }}'
31+
embed-description: ${{ github.event.pull_request.body }}
32+
embed-url: ${{ github.event.pull_request.html_url }}

0 commit comments

Comments
 (0)