Skip to content

API docs for useDeferredValue's initialValue #6747

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 3 commits into from
Apr 22, 2024

Conversation

acdlite
Copy link
Member

@acdlite acdlite commented Apr 10, 2024

Updates the API docs for useDeferredValue to include the initialValue option, added in
facebook/react#27500.

This feature is slated for release in React 19.

Updates the API docs for `useDeferredValue` to include the
`initialValue` option, added in
facebook/react#27500.

This feature is slated for release in React 19.
Copy link

vercel bot commented Apr 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 17, 2024 1:28am

Copy link

github-actions bot commented Apr 10, 2024

Size changes

📦 Next.js Bundle Analysis for react-dev

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

acdlite added a commit to acdlite/react that referenced this pull request Apr 10, 2024
Per team discussion, this upgrades the `initialValue` argument for
`useDeferredValue` from experimental to canary.

- Original implementation PR: facebook#27500
- API documentation PR: reactjs/react.dev#6747
Copy link
Member

@rickhanlonii rickhanlonii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, after #6742 lands, we can add a <CanaryBadge> label for this value so it's clear it's canary. I'll rebase and add it before landing this.

@rickhanlonii
Copy link
Member

rickhanlonii commented Apr 11, 2024

@acdlite I pushed an update with these changes:

  • I added an inline Canary badge for the param
  • I moved the Canary specific behavior to a Canary section
  • I moved some of the caveats to the Caveats section

Screenshot

Screenshot 2024-04-11 at 9 54 52 AM

@acdlite
Copy link
Member Author

acdlite commented Apr 15, 2024

@rickhanlonii Where did you push that? I don't see it

acdlite added a commit to facebook/react that referenced this pull request Apr 16, 2024
Per team discussion, this upgrades the `initialValue` argument for
`useDeferredValue` from experimental to canary.

- Original implementation PR:
#27500
- API documentation PR: reactjs/react.dev#6747

I left it disabled at Meta for now in case there's old code somewhere
that is still passing an `options` object as the second argument.
* Add docs for onCaughtError and onUncaughtError

* Updates from feedback
@rickhanlonii
Copy link
Member

Oops, pushed

Copy link
Member

@rickhanlonii rickhanlonii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, we can fix forward if needed

@rickhanlonii rickhanlonii merged commit 07cbd00 into reactjs:main Apr 22, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants