useDvaStore function
Store
useDvaStore()
A hook that retrieves the Store instance from the Dva Provider.
Unlike useDvaConnect, this hook does not subscribe to Store state changes, so the widget will not automatically rebuild when the state changes. Use this when you need direct access to the Store for manual operations.
Returns a Store instance with access to rootState and subscription methods.
Example usage:
final store = useDvaStore();
// Access root state
store.rootState;
// Manually subscribe to state changes
store.subscribe((lState, nState) {
// Handle state change
});
Implementation
Store useDvaStore() {
return use(
_DvaStoreHook(),
);
}