You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to monitor store changes and then perform some operations. I used the useStore.subscribe API, but it reported an error saying that this method could not be found.
This discussion was converted from issue #90 on September 18, 2024 10:29.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Description
I want to monitor store changes and then perform some operations. I used the useStore.subscribe API, but it reported an error saying that this method could not be found.
Steps
export const useStore = () => mapValuesKey('use', rootStore);
const saveStore = useStore.subscribe(console.log('saveStore'));
Expectation
I want to know how to use useStore.subscribe api
Beta Was this translation helpful? Give feedback.
All reactions