query icon indicating copy to clipboard operation
query copied to clipboard

Next.js is supported correclty?

Open 21Chani opened this issue 2 years ago • 2 comments

When I try to use a atom I get the following warn: The result of getSnapshot should be cached to avoid an infinite loop

the data is fetched correctly, is just a warn, also fetcher is called 3-4 times

21Chani avatar Jul 31 '23 19:07 21Chani

Hi, @21Chani!

Short answer: no, it's not supported neither by @nanostores/query nor by nanostores in general. SSR support is very poor now. You can read more in this issue.

It's been this way for a long time, but it's going to change soon when we introduce Contexts. I hope this work will be finished in August.

dkzlv avatar Aug 04 '23 11:08 dkzlv

It's weird, but I'm getting the queries re-requested when navigating through pages (they're all in client components, queries are made inside useStore).

Maybe I did something wrong. I'll try again with a small demo

baileys-li avatar Sep 06 '24 05:09 baileys-li