Socket
Book a DemoInstallSign in
Socket

@g123jp/recoil-observer

Package Overview
Dependencies
Maintainers
4
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@g123jp/recoil-observer

A simple recoil dev tool to observe the state changes.

latest
Source
npmnpm
Version
0.0.2
Version published
Maintainers
4
Created
Source

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

propsdescriptiondefault valuetype
checkInitStatewhether check the default state or nottrueboolean
logconsole.log the state KVtrueboolean
useDevToolspost the message to other devToolsfalseboolean

Keywords

recoil

FAQs

Package last updated on 24 Feb 2022

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