solid-zustand icon indicating copy to clipboard operation
solid-zustand copied to clipboard

useStore failed to get the state slice

Open LavaCxx opened this issue 10 months ago • 1 comments

When I use createWithSignal, useStore sometimes returns the entire state object after a period of time, instead of the selected slice.

const feeds=useStore(state=>state.feeds)
console.log('feeds',feeds())

setTimeout(()=>{
  console.log('feeds',feeds())
},1000)
image

LavaCxx avatar Apr 05 '24 13:04 LavaCxx

The same happened for me. I ended up using the store without any selectors.

durkiewicz avatar Apr 09 '24 08:04 durkiewicz

Stupid me 🤦🏼 fixed

wobsoriano avatar May 14 '24 00:05 wobsoriano