material-ui-search
material ui search bar
Install
npm install --save material-ui-search
Add the Reducer to Redux store
The first step is to add the reducer to your rootReducer when creating Redux's store.
const rootReducer =
Add the SearchbarProvider component to the tree
The second step is to add the SearchbarProvider
component somewhere in your app.
const store = ReactDOM
Set the searchbar data
Component { const searchbar = thisprops searchbar; } { <div> <SearchBar onChange= { this } onRequestSearch= { this } onCancelSearch= { this } style= margin: '0 auto' maxWidth: 800 /> </div> } MyComponent = MyComponent
Access the search data
Component { const searchQuery = thispropssearchbar return <ReactFragment> <h3>searchQuery</h3> </ReactFragment> } GetComponent = GetComponent