README
react-core
Install
Install this package with npm
npm i @salsita/react-core
or yarn
yarn add @salsita/react-core
API
Modules
Functions
- buildStore(rootReducer, rootSaga, router) ⇒
Store
Builds a store and applies saga and router5 middleware
It applies a saga middleware, a router5 middleware, and runs the root saga.
RootSelectors
- RootSelectors
- .getApi(state) ⇒
ApiState
- .getCrud(state) ⇒
CrudState
- .getEntities(state) ⇒
EntitiesState
- .getRouter(state) ⇒
RouterState
- .getApi(state) ⇒
ApiState
RootSelectors.getApi(state) ⇒ Returns the state of the API module
Kind: static method of RootSelectors
Returns: ApiState
- The state of the API module
Param | Type | Description |
---|---|---|
state | State |
The root state of your app |
CrudState
RootSelectors.getCrud(state) ⇒ Returns the state of the CRUD module
Kind: static method of RootSelectors
Returns: CrudState
- The state of the CRUD module
Param | Type | Description |
---|---|---|
state | State |
The root state of your app |
EntitiesState
RootSelectors.getEntities(state) ⇒ Returns the state of the entities module
Kind: static method of RootSelectors
Returns: EntitiesState
- The state of the entities module
Param | Type | Description |
---|---|---|
state | State |
The root state of your app |
RouterState
RootSelectors.getRouter(state) ⇒ Returns the state of the router
Kind: static method of RootSelectors
Returns: RouterState
- The state of the router
Param | Type | Description |
---|---|---|
state | State |
The root state of your app |
Store
buildStore(rootReducer, rootSaga, router) ⇒ Builds a store and applies saga and router5 middleware
It applies a saga middleware, a router5 middleware, and runs the root saga.
Kind: global function
Returns: Store
- A redux store instance
Param | Type | Description |
---|---|---|
rootReducer | Reducer |
The root reducer of your app |
rootSaga | Saga |
The root saga of your app |
router | Router |
A router5 instance |