diff --git a/README.md b/README.md index 7d7a4e5..0fd4507 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,44 @@ class Example extends Component { return } } +``` +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 ( +
+ +
+ ) +} + ``` ## License