useStore

information

By default, the export package name for all APIs in this section is: @modern-js/runtime/model.

If Reduck is integrated separately from Modern.js, the export package name is: @modern-js-reduck/react.

useStore Used to get the store shared by the current component tree.

Function Signature

function useStore(): ReduckStore;

Return Type

  • ReduckStore: Reduck Store, type refer to the return type of createStore.
More