The redux-io defines a set of actions, reducers, selectors, middleware and helper functions for easier managing of data in redux state. This section documents the complete redux-io API.
- resource(schema, initialState = {})
- storage(schema, initialState = {})
- collection(schema, tag = '', settings = {}, initialState = [])
- one(schema, tag = '', settings = {}, initialValue = '')
- create(config, schema, item = null)
- find(schema, tag = '', params = {}, options = {})
- update(config, schema, item)
- remove(config, schema, item)
- next(collection, appendMode = true)
- created(payload, schema)
- loaded(payload, schema)
- updated(payload, schema)
- removed(payload, schema)
- clear(schema, tag = '')
- invalidate(schema, tag = '')
- checkExipration()
- isValid(rioObject)
- isError(rioObject)
- isBusy(rioObject)
- isInitialized(rioObject)
- shouldRefresh(rioObject)
- isExpired(rioObject)
- cloneStatus(sourceObject, destinationObject, markChange = false)
Every function described above is a top-level export, except rio that has default export. You can import any of them like this:
import rio, { find, storage } from '@shoutem/redux-io'