Skip to content

event-storm/react-event-storm

Repository files navigation

Publish codecov

The React event storm is providing a lightweight, minimal abstraction for the Event Storm library.

Technical stack

  • React ^16.8.0(hooks support)

Installation

To install the library run:

# npm
npm i react-event-storm

# yarn
yarn add react-event-storm

:::caution The library is using event storm as a peer dependency, so you need to install it. :::

Simple example

import { createStorm } from 'event-storm';
import { useStorm } from 'react-event-storm';

const defaultState = {
  name: 'React Event Storm',
}

const storm = createStorm(defaultState);

function Component() {
  const { name } = useStorm(storm);
  return <span>This is {name}</span>
}

See it in action

Examples: