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

Does Suspense and Error boundries work with klyva? Also does it work with concurrent mode? They quite stressed this when introducing recoil #30

Open
sesam opened this issue Jan 25, 2021 · 5 comments

Comments

@sesam
Copy link

sesam commented Jan 25, 2021

☝️ asking for a friend :) cc @kkogovsek

@merisbahti
Copy link
Owner

Heya :D

Regarding suspense...

Well, depends on what you're asking. But for suspense, I've explicitly decided to not implement any support for that. I think if you should fetch data, use react-query or something honestly, you can generate the "keys" and "parameters" for the query in atoms of course... I know jotai has support for suspense, but I've never used it.

I honestly don't think suspense brings that much joy to the dev experience anyways? Have you tried it? It made me feel way less secure about my code.

Regarding error boundaries:

Hmm, how do you mean?

Regarding CM...

I honestly don't know? Is there any information about this? (I mean, will your code-bases custom hook work with CM?)

Yes I have CM anxiety and I'm not even sure the code I write today will be usable when CM rolls out, and we haven't gotten that much info regarding this from the react team. Mostly some talks and no definite tools or experience around CM that makes easy to assert a good answer to your question.

I've put klyva in this table here: https://github.com/dai-shi/will-this-react-global-state-work-in-concurrent-mode#results and it looks like there are very few state management solutions that pass the "No-tearing" test. Note that recoil does not pass the test.

@sesam
Copy link
Author

sesam commented Jun 29, 2021

klyva was added in dai-shi/will-this-react-global-state-work-in-concurrent-rendering#28
and I don't see it n the table now, but don't see in https://github.com/dai-shi/will-this-react-global-state-work-in-concurrent-rendering/commits/master any other PR removing klyva. Hm.

@merisbahti
Copy link
Owner

I think I found the one removing klyva, here:

dai-shi/will-this-react-global-state-work-in-concurrent-rendering@46187ce

@merisbahti
Copy link
Owner

I should make a PR when I get off work :P

@sesam
Copy link
Author

sesam commented Jun 29, 2021

Perfect. Yes - it looks like an oversight in the reorg :)
Also, this dai-shi/will-this-react-global-state-work-in-concurrent-rendering@68c445f removed a lot of libs and code+deps related to klyva too.

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

No branches or pull requests

2 participants