Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,44 @@ class Example extends Component {
return <SearchBar Data={Data} />
}
}
```
Using Hooks

```jsx
import React from 'react';
import { SearchBar } from 'react-search-bar';

const Data = [
{
key: 'john',
value: 'John Doe'
},
{
key: 'jane',
value: 'Jane Doe'
},
{
key: 'mary',
value: 'Mary Phillips'
},
{
key: 'robert',
value: 'Robert'
},
{
key: 'karius',
value: 'Karius'
}
];

const App = () => {
return (
<div>
<SearchBar Data = { Data } />
</div>
)
}

```

## License
Expand Down