We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
The most basic usage of redux-capacitor is to wrap a default export with an HOC
import { entities } from 'entities' class Component extends React.Component { renderItems = () => { const { collection } = this.props return collection.items.map(item => <p>{item.bar}</p>) } render () { return this.renderItems() } } export entities({collection: {type: 'foo'}})(default)
In the above, {type: 'contact'} would reference a record type called contact defined in records.js
{type: 'contact'}
contact
records.js
By wrapping this component with the entities HOC, a prop called collection would be passed to Component.
collection
Component
Component has a number of attributes on it containing data and information about the state of the collection: More on that here: Container Props