Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@flexbase/store-react

Package Overview
Dependencies
Maintainers
4
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@flexbase/store-react

React extensions for @flexbase/store

latest
Source
npmnpm
Version
3.0.0
Version published
Maintainers
4
Created
Source

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>
  );
};

Keywords

flexbase

FAQs

Package last updated on 07 Jun 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts