Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
macoley committed Apr 11, 2022
2 parents 5cf3c37 + 03345bb commit 0d37391
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
## Install

```bash
npm install --save @bit-about/event
npm i @bit-about/event
```

## Features
Expand All @@ -21,7 +21,7 @@ npm install --save @bit-about/event
- Efficient and hook-based
- ...with static listener and dispatcher
- No centralized event provider
- Tiny - only **2kB**
- Tiny - only **1.6kB**
- **Just works**

## Usage
Expand Down Expand Up @@ -50,11 +50,11 @@ const App = () => (

```jsx
const Button = () => {
const dispatchEvent = useEvent()
const dispatch = useEvent()

const onButtonClick = () => dispatchEvent('buttonClicked', 'Hello')
const onClick = () => dispatch('buttonClicked', 'Hello')

return <button onClick={onButtonClick}>Call event</button>
return <button onClick={onClick}>Call event</button>
}
```

Expand Down

0 comments on commit 0d37391

Please sign in to comment.