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

refresh setter to reset error boundary #94

Merged
merged 1 commit into from
Sep 29, 2024
Merged

Conversation

kalijonn
Copy link
Collaborator

@kalijonn kalijonn commented Sep 22, 2024

solves #32, #72

Error is a valid value that an atom can hold. So we need to force the atom to re-evaluate while resetting the error boundary for the fetch to happen again.

@dai-shi Do you have a preference for versioning this? We are changing the signature of the atom to return a WritableAtom to expose a setter which resets the error boundary. My preference is to bump the minor version instead of the patch version. What do you think?

Tangent: Should error be considered a valid value in jotai when checking if the atom should recompute?

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.

@dai-shi
Copy link
Member

dai-shi commented Sep 27, 2024

My preference is to bump the minor version instead of the patch version.

sounds good to me.

@kalijonn kalijonn merged commit 4e51c9f into main Sep 29, 2024
3 checks passed
@kalijonn kalijonn deleted the kj/refetch-on-error branch September 29, 2024 13:31
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