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

fix: bind write fn of withAtomEffect to target atom #48

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

dmaskasky
Copy link
Member

@dmaskasky dmaskasky commented Dec 17, 2024

Reference

#46, #47

Summary

withAtomEffect should bind the this context of the target write function when the target is writable. Otherwise, the wrong atom gets updated.

Changes

  1. test: Update test to better reflect writing to enhanced atom
  2. fix: bind target context to enhanced atom write function

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.

@dmaskasky dmaskasky merged commit d2a02e3 into main Dec 17, 2024
3 checks passed
@dmaskasky dmaskasky deleted the fix/writable-withAtomEffects branch December 17, 2024 22:28
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.

1 participant