1.1.2-alpha • Published 6 years ago

react-redux-hover v1.1.2-alpha

Weekly downloads
2
License
MIT
Repository
-
Last release
6 years ago

react-redux-hover

react-redux-hover is a small and simple module to manage hover effect on react component.

1. Get Started

2. Make your own implementation

Get Started :

import { HoverEffect, hover } from 'react-redux-hover';
import { combineReducers, createStore } from 'redux';
import { Provider } from 'react-redux';
import { render } from 'react-dom'

const store = createStore(combineReducers({
  // Import 'hover' from react-redux-hover into your reducers
  hover
}));

const App = () => (
    <Provider store={store}>
        <HoverEffect id="AnUniqueIdentifier">
        {
            show => //show is a boolean.
                <div style={{
                    backgroundColor: show ? 'red' : 'blue'
                }}>
                    Hello world!
                </div>
        }
)

render(<App/>, document.querySelector('#app'))

The hoverEffect is a component who return a callback function with a parameters to manage hover effect. (here bashow)

1.1.2-alpha

6 years ago

1.1.1-alpha

6 years ago

1.1.0-alpha

6 years ago

1.0.9-alpha

7 years ago

1.0.8-alpha

7 years ago

1.0.7-alpha

7 years ago

1.0.6-alpha

7 years ago

1.0.5-alpha

7 years ago

1.0.4-alpha

7 years ago

1.0.3-alpha

7 years ago

1.0.2-alpha

7 years ago

1.0.1-alpha

7 years ago

1.0.0-alpha

7 years ago