-
Notifications
You must be signed in to change notification settings - Fork 132
Sync with react.dev @ f8c81a0f #365
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
Open
react-translations-bot
wants to merge
87
commits into
main
Choose a base branch
from
sync-f8c81a0f
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: unknown <[email protected]~>
`a expensive` should be `an expensive`
Fix "documentatino" typo to "documentation" in comment about useOptimistic reference page.
…d example of the use API (#7767) * Update "Deep Dive" in reusing-logic-with-custom-hooks.md with link to and example of the use API * Remove mention of Server Components when explaining the use API * Update src/content/learn/reusing-logic-with-custom-hooks.md Co-authored-by: Ricky <[email protected]> * fix: Correct which lines are highlighted in code example --------- Co-authored-by: Ricky <[email protected]>
The previous examples used a service called loremflickr.com to link to placeholder images. Since that service is now down, I updated them to reference placecats.com instead, which we already use in other examples as well. placecats doesn't have the same random cat feature so I roughly approximated it in the example code. Closes #7966
* Fix handleClick compiler intro example * Use a note instead * Update src/content/learn/react-compiler/introduction.md
* fix: changed source file names in docs from App.js, index.js and styles.css to src/ dir * fix: updated wrong image with the correct one with current sandbox file structure * refactor: reverted all formatting and just just mention src folder in introductory section * Reverted changes tutorial-tic-tac-toe.md * added enhanced image of sandbox
* docs: add flushSync Troubleshooting section * Update src/content/reference/react-dom/flushSync.md * oops * Apply suggestions from code review * formatting and pitfall --------- Co-authored-by: Ricky <[email protected]> Co-authored-by: Rick Hanlon <[email protected]>
* correct IconExperimental naming and usage (from #7972) Co-authored-by: Tuna <[email protected]> * Bump Activity to Canary in docs --------- Co-authored-by: Tuna <[email protected]>
Happened to notice we were still on an old version of the compiler. This PR upgrades us to use the latest RC.
Copied over our copyright script from the react repo. I made a small fix to handle shebangs.
* Add copyright script Copied over our copyright script from the react repo. I made a small fix to handle shebangs. * Update copyright on all files Run the script.
…iler (#7988) In facebook/react#34462 for example, we found an issue where the compiler was incorrectly validating an example straight from the docs. In order to find more issues like this + also provide more feedback to doc authors on valid/invalid patterns, this PR adds a new local eslint rule which validates all markdown codeblocks containing components/hooks with React Compiler. An autofixer is also provided. To express that a codeblock has an expected error, we can use the following metadata: ```ts // pseudo type def type MarkdownCodeBlockMetadata = { expectedErrors?: { 'react-compiler'?: number[]; }; }; ``` and can be used like so: ```` ```js {expectedErrors: {'react-compiler': [4]}} // ❌ setState directly in render function Component({value}) { const [count, setCount] = useState(0); setCount(value); // error on L4 return <div>{count}</div>; } ``` ```` Because this is defined as a local rule, we don't have the same granular reporting that `eslint-plugin-react-hooks` yet. I can look into that later but for now this first PR just sets us up with something basic.
* Add local eslint rule to validate markdown codeblocks with React Compiler In facebook/react#34462 for example, we found an issue where the compiler was incorrectly validating an example straight from the docs. In order to find more issues like this + also provide more feedback to doc authors on valid/invalid patterns, this PR adds a new local eslint rule which validates all markdown codeblocks containing components/hooks with React Compiler. An autofixer is also provided. To express that a codeblock has an expected error, we can use the following metadata: ```ts // pseudo type def type MarkdownCodeBlockMetadata = { expectedErrors?: { 'react-compiler'?: number[]; }; }; ``` and can be used like so: ```` ```js {expectedErrors: {'react-compiler': [4]}} // ❌ setState directly in render function Component({value}) { const [count, setCount] = useState(0); setCount(value); // error on L4 return <div>{count}</div>; } ``` ```` Because this is defined as a local rule, we don't have the same granular reporting that `eslint-plugin-react-hooks` yet. I can look into that later but for now this first PR just sets us up with something basic. * fix compiler errors I went through the list of existing errors and tried to separate the expected errors from those that seem to be flagging unexpected issues. In particular, our effects validations are flagging patterns that our own docs examples use. I added todos for these and will follow up later.
This reverts commit 5cc9b7b.
Upgrade to latest
Updates our blog posts and docs for React Compiler 1.0
* Fix server/client typo in <form> docs Fixes #6601 * Update form.md * Update form.md * Update form.md
This reverts commit 6346efd.
Co-authored-by: Sebastian "Sebbie" Silbermann <[email protected]>
…ct Router (#8076)
Removed CityJS New Delhi 2025 conference details and added CityJS Singapore 2026, CityJS New Delhi 2026, and CityJS London 2026 conference details.
… (#8026) * Fix Server Components link text to match target section heading Change "React Server Components" to "Full-stack frameworks" in the server-components.md link text to accurately reflect the destination section heading * Remove unnecessary RSC tags from Server Components documentation
…pis.md (#7990) Because components link to /reference/react/components, I think hooks should link to /reference/react/hooks.
…/index.md (#7983) Suggestion: Link to /reference/react/hooks rather than /reference/react. The preceding sentence refers to “If you are looking for Hooks that are supported in web browsers *and other environments* see [the React Hooks page](/reference/react/hooks). This page lists all the Hooks in the `react-dom` package.” which matches the React Hooks page better.
* clarify SRP definition * Update src/content/learn/thinking-in-react.md --------- Co-authored-by: Ricky <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR was automatically generated.
Merge changes from react.dev at f8c81a0
The following files have conflicts and may need new translations:
Please fix the conflicts by pushing new commits to this pull request, either by editing the files directly on GitHub or by checking out this branch.
DO NOT SQUASH MERGE THIS PULL REQUEST!
Doing so will "erase" the commits from main and cause them to show up as conflicts the next time we merge.