@g123jp/recoil-observer
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

recoil-observer

A simple recoil dev tool to observe the state changes.

  • log the state once changed.
  • post message to other dev tool like a chrome-extension.
  • optional to do nothing in production environment.

1. install

yarn add recoil-observer

with

  • recoil (>=0.6)
yarn add recoil

2. usage

import { RecoilObserver } from 'recoil-observer';
return (
  <RecoilRoot>
    <RecoilObserver />
    ...
  </RecoilRoot>
);

3. API

props description default value type
checkInitState whether check the default state or not true boolean
log console.log the state KV true boolean
useDevTools post the message to other devTools false boolean

Package Sidebar

Install

npm i @g123jp/recoil-observer

Weekly Downloads

0

Version

0.0.2

License

MIT

Unpacked Size

9.23 kB

Total Files

16

Last publish

Collaborators

  • lukaszmoskwactw
  • chinterry
  • huli-ctw
  • hydranger
  • kouhin