-
-
Notifications
You must be signed in to change notification settings - Fork 641
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(vanilla): prefer using this
for atom config
#2186
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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 f4168f9:
|
Size Change: +284 B (0%) Total Size: 68.6 kB
ℹ️ View Unchanged
|
Can you please give a short example to explain the difference when patching atom before/after this change? |
jotaijs/jotai-scope#5 is open. |
jotaijs/jotai-scope#5 seems to work well. Let's do this. |
This reverts commit 83731ed.
It was intentional to avoid
this
so that it's never confusing when copying atom config objects.(btw, this was the reason we avoided using class syntax suggested by @Thisen. so, it might be reconsiderable. Though, I'm not sure the final decision because of bundle size / little performance trade-off.)
As it turns out, not using
this
blocks some extended patterns. jotaijs/jotai-scope#4(And, I ended up with a suboptimal solution jotaijs/jotai-scope#2.)
Let's see how it can change the situation.