utsubo-events
v0.0.1Utsubo-events
Minimalist library to emit and receive custom events. useEvents
will be automatically attached on mounted and detached on unmounted.
import {emitEvents, useEvents} from 'utsubo-events'
emitEvent((payload) => {
// payload = 5
})
const DummyComponent = () => {
useEvents((payload) => {
// payload = 5
}, {once: false})
return null
}
npm i utsubo-events
Homepage
github.com/utsuboco/utsubo-e...Metadata
- MIT
- Whatever
- Renaud Rohlinger
- released 9/16/2021