The Image shows the data in a store.select call( in chrome debugger ) . ! [1]: https://i.stack.imgur.com/w049q.png
I want to check the Data in a store.select( data ) call. But I dont see any. How do I get the data in the store on hover in chrome debugger.
Getting data from store is asynchronous. And to get data - you should know the key name, you want to get. And each time this key in store is changes - your subscribed callback function will run and can assign stored value to some variable
And only after that you can show that variable with assigned value. For example:
let stream$ = Store.select((store) => store.superKey)
let localValue;
stream.subscribe((value) => localValue = value); // will be called each time store.superKey is reassigned with new value
document.querySelector('button').addEventListener('click', (event) => {
//here you can show localValue somewhere.
})
Very abstract but hope I've got an idea.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.