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

feat(devtools): read-only atom support in useAtomDevtools #817

Merged

Conversation

Aslemammad
Copy link
Member

@Aslemammad Aslemammad commented Nov 4, 2021

Previously, useAtomDevtools only accepts primitive atoms (more precisely WritableAtom<Value, Value> type). Now, with this PR, it supports read-only atoms (Atom<Value> type).

close #808

@vercel
Copy link

vercel bot commented Nov 4, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/pmndrs/jotai/DWZndSUYFFTznovf7kwXoR5ZADNv
✅ Preview: https://jotai-git-fork-aslemammad-feat-useatomdevtools-re-d7fbb6-pmndrs.vercel.app

@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 4, 2021

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.

Latest deployment of this branch, based on commit 21cf8af:

Sandbox Source
React Configuration
React Typescript Configuration
React Browserify Configuration
React Snowpack Configuration
Next.js Configuration
Next.js with custom Babel config Configuration
React with custom Babel config Configuration

@Aslemammad
Copy link
Member Author

@dai-shi dai-shi marked this pull request as ready for review November 5, 2021 12:11
Copy link
Member

@dai-shi dai-shi left a comment

Choose a reason for hiding this comment

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

overall looks good. just minor suggestions.

src/devtools/useAtomDevtools.ts Outdated Show resolved Hide resolved
src/devtools/useAtomDevtools.ts Outdated Show resolved Hide resolved
src/devtools/useAtomDevtools.ts Show resolved Hide resolved
src/devtools/useAtomDevtools.ts Outdated Show resolved Hide resolved
src/devtools/useAtomDevtools.ts Outdated Show resolved Hide resolved
Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>
Copy link
Member

@dai-shi dai-shi left a comment

Choose a reason for hiding this comment

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

A few questions before finishing.

src/devtools/useAtomDevtools.ts Outdated Show resolved Hide resolved
src/devtools/useAtomDevtools.ts Show resolved Hide resolved
Copy link
Member

@dai-shi dai-shi 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 to me. Will merge it when we release it.

@dai-shi dai-shi added this to the v1.4.3 milestone Nov 7, 2021
@dai-shi dai-shi changed the title feat: readOnly atom support feat(devtools): read-only atom support in useAtomDevtools Nov 7, 2021
@dai-shi dai-shi merged commit ab6da01 into pmndrs:main Nov 7, 2021
@Aslemammad
Copy link
Member Author

Thanks!

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.

devtools: useAtomDevtools to support read-only atoms
2 participants