@salsita/react-core

Install this package with npm

Usage no npm install needed!

<script type="module">
  import salsitaReactCore from 'https://cdn.skypack.dev/@salsita/react-core';
</script>

README

react-core

Install

Install this package with npm

npm i @salsita/react-core

or yarn

yarn add @salsita/react-core

API

Modules

RootSelectors

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

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

RootSelectors.getCrud(state) ⇒ CrudState

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

RootSelectors.getEntities(state) ⇒ EntitiesState

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

RootSelectors.getRouter(state) ⇒ RouterState

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

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.

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