solid-zustand
solid-zustand copied to clipboard
useStore failed to get the state slice
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)
The same happened for me. I ended up using the store without any selectors.
Stupid me 🤦🏼 fixed