Skip to content

A powerful React hook that subscribes to Redux store events.

Notifications You must be signed in to change notification settings

Qeepsake/use-redux-effect

Repository files navigation

use-redux-effect

All Contributors

A powerful React hook that subscribes to Redux store events

NPM JavaScript Style Guide

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):


Luke Brandon Farrell

📆 💻

Amogh Jahagirdar

💻 📖

This project follows the all-contributors specification. Contributions of any kind welcome!