use-redux-effect
v1.1.4
Published
A powerful React hook that subscribes to Redux store events
Downloads
436
Readme
use-redux-effect
A powerful React hook that subscribes to Redux store events
Install
npm install --save use-redux-effect
Usage
First, add the hook and set it up to execute the desired logic
import {Text} from 'react-native'
import { useReduxEffect } from 'use-redux-effect'
const ExampleClass = (props) => {
useReduxEffect((exampleEffect) => {
// Execute code
}, eventType, [props]);
return <Text>This is an example Component</Text>
}
Next, add the reducer that recieves the action to your Redux store :
import {actionReducer} from 'use-redux-effect'
const reducers = {
action : actionReducer
}
// Proceed to add into the Redux store of your application
License
MIT © lukebrandonfarrell
Contributors ✨
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!