3.0.0 • Published 11 months ago

@flexbase/store-react v3.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

store-react

Coverage Quality Gate Status

Installation

npm install @flexbase/store-react

or

yarn add @flexbase/store-react

Usage

useStore

integrates useState with flexbase store

import { useStore } from '@flexbase/store-react';

export const component = () => {
  const [value, setValue] = useStore(store);

  return (
    <div>
      <p>You clicked {value} times</p>
      <button onClick={() => setValue(count + 1)}>Click me</button>
    </div>
  );
};

useStoreLayout

integrates useLayoutEffect with flexbase store

import { useStoreLayout } from '@flexbase/store-react';

export const component = () => {
  const [value, setValue] = useStoreLayout(store);

  return (
    <div>
      <p>You clicked {value} times</p>
      <button onClick={() => setValue(count + 1)}>Click me</button>
    </div>
  );
};
3.0.0

11 months ago

1.0.2

1 year ago

1.0.1

1 year ago

2.1.0-beta.4

1 year ago

2.1.0-beta.6

1 year ago

1.0.0-beta.2

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

2.1.1

1 year ago

1.0.6-beta.3

1 year ago

2.1.0

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.0.0

2 years ago