-
-
Notifications
You must be signed in to change notification settings - Fork 617
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
atom family util #45
atom family util #45
Conversation
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 98052e8:
|
I'm not really happy with replicating types from |
So sorry @dai-shi, this took me longer than I expected to test. I kept having issues linking the package to my demo, and basically had to end up hacking it together. That being said, it was actually really easy to migrate! I ended up removing a net of 49 lines with Jotai from Recoil. I want to get the diff up on GitHub to be able to share at some point. The only thing I'm really not sure about is the I can try and whip up a simple example to show you what I mean if that was at all confusing. Otherwise great work! I'm really excited for when this gets officially pushed in, definitely makes me want to try jotai more! |
Sounds great! For |
Now, I feel like |
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 96a7fa8:
|
Hmm, type T = typeof atom extends (read: number) => infer R ? R : never This can't infer type properly. |
Finally made a working and fully typed demo. |
Glad you got a demo up, it's looking good! I definitely get the desire to have a
I totally agree, and I didn't even realize it was the other way 😅 I was trying to do it with the param initially, so it wasn't even working. It's a bit difficult though to know whether or not you've removed the atom, because by checking you'll basically just recreate the atom. Overall though, great work! Let me know if there's anything I can do to help push this in |
Close #23