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

doc: update atom-effect docs #2188

Merged
merged 1 commit into from
Oct 16, 2023
Merged

Conversation

dmaskasky
Copy link
Collaborator

Related Issues or Discussions

jotaijs/jotai-effect#10

Summary

  • use caution when using async atom-effects
  • improve language on comparison with useEffect

Check List

  • yarn run prettier for formatting code and docs

@vercel
Copy link

vercel bot commented Oct 16, 2023

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 Oct 16, 2023 11:00pm

@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 16, 2023

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 16f27d0:

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

 - use caution when using async atom-effects
 - improve language on comparison with useEffect
@@ -232,12 +232,14 @@ Aside from mount events, the effect runs when any of its dependencies change val
- **Async:**
For effects that return a promise, all atoms accessed with `get` prior to the returned promise resolving are added to the atom's internal dependency map. Atoms that have been watched after the promise has resolved, for instance in a `setTimeout`, are not included in the dependency map.

⚠️ Use [caution](https://github.com/jotaijs/jotai-effect/discussions/10) when using async effects
Copy link
Member

Choose a reason for hiding this comment

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

My suggestion is to drop async, but let's merge this PR for now.

@dai-shi dai-shi merged commit a8b9b42 into pmndrs:main Oct 16, 2023
30 checks passed
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