Skip to content

feat: add unstable_defaultUse #3111

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

himself65
Copy link
Collaborator

From v3 discussion #2889

Do not use use in useAtomValue (migration path: add { use: true } option which is true by default in v2, and warns it)

Copy link

vercel bot commented Jul 29, 2025

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

Name Status Preview Comments Updated (UTC)
jotai ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 29, 2025 11:56pm

Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Copy link

LiveCodes Preview in LiveCodes

Latest commit: 0438ff3
Last updated: Jul 29, 2025 11:56pm (UTC)

Playground Link
React demo https://livecodes.io?x=id/444XAH6WH

See documentations for usage instructions.

Copy link

pkg-pr-new bot commented Jul 29, 2025

More templates

npm i https://pkg.pr.new/jotai@3111

commit: 0438ff3

@dai-shi
Copy link
Member

dai-shi commented Jul 30, 2025

I would like to wait for #2889 (comment) a little more.

Once we decided our plan, we don't need unstable_ prefix. btw, what's the implication behind defaultUse instead of use?

const {
delay,
unstable_promiseStatus: promiseStatus = !React.use,
unstable_defaultUse = true,
Copy link
Member

Choose a reason for hiding this comment

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

We should warn if it's undefined for the migration. So, it's too early to merge this PR.

@dai-shi dai-shi marked this pull request as draft July 30, 2025 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants