createStore function

AjwahStore createStore (
  1. {bool exposeApiGlobally: false}
)

This is the entry point of the ajwah store.

final store = createStore();

exposeApiGlobally by default it is false. If you pass true then global functions like storeInstance(), dispatch(), select(), registerState(), etc should be exposed.

createStore(exposeApiGlobally:true);

Implementation

AjwahStore createStore({bool exposeApiGlobally = false}) {
  var store = AjwahStore();
  if (exposeApiGlobally) {
    _store = store;
  }
  return store;
}