jotaijs / jotai-urql

Jotai integration library for URQL
MIT License
29 stars 5 forks source link

Create atomWithObservable only once #20

Open scamden opened 6 months ago

scamden commented 6 months ago

This is in response to a few issues we've had and was suggested as a possible solution in https://github.com/jotaijs/jotai-urql/issues/17

I'm trying it in our code base via a published version of our fork and thought I would put it up for dicussion here.

RIP21 commented 6 months ago

I haven't touched this codebase for some time plus my Jotai skills are a bit rusty (not using it for quite some time). But if it works and passes all the test cases we have. Then it's good for me. If you have some special test scenarios not covered with our test suite, please add the test cases, so we can keep everything 100% tested no matter the corner case.

Once it's done then I'll approve this and publish new version. Looking at your comment in the issue, I see that you're much deeper in the rabbit hole than I will ever be with Jotai ever again :D (I'm not a fan anymore) So if you will fix it and test it, well, kudos to you :D

jtcomp commented 5 months ago

⬆️ On this fix - I had to patch the most recent version of jotai-urql because I was running into the same issue.