1.0.1 • Published 3 years ago
@angeleduardo/react-redux-pattern v1.0.1
react-redux-pattern
A simple way to use Redux
Install
npm install --save react-redux-pattern
Or...
yarn add react-redux-pattern
Or...
pnpm add react-redux-pattern
Usage
import React, { Component } from 'react'
import MyApplication from './MyApplication'
import ReduxAPIProvider from 'react-redux-pattern'
const initialState = {
coconuts: 100
}
const App = () => {
return (
<ReduxAPIProvider
initialState={YOUR_INITIAL_STATE}
enablePersistence={false} // <--- You can do this if you don't want the default persistence.
persistenceConfig={...} // <--- This is optional. You can define your own persistence configuration and storage handler.
LoadingComponent={...} // <--- Also optional. If you want, you could define a component that will be shown when loading the persistence.
>
<MyApplication />
</ReduxAPIProvider>
)
}