Socket
Socket
Sign inDemoInstall

storybook-addon-recoil-flow

Package Overview
Dependencies
123
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    storybook-addon-recoil-flow

Shows a graph of the current recoil state


Version published
Weekly downloads
6.2K
increased by11.56%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

storybook-addon-recoil-flow

Adds a panel to monitor the entire state of recoil for your story.

Recoil Flow Logo

Setup

Method 1: The Recoil Root is provided by another decorator addon

The addon can be installed by just installing via npm / yarn then adding "storybook-addon-recoil-flow" to the addons array in ./storybook/main.js. Ensure that this addon & whichever one is providing the RecoilRoot are in the correct order.

Method 2: The Recoil Root is provided by a decorator within the story

  • Install via npm / yarn
  • Add storybook-addon-recoil-flow/dist/register to the addons array
  • Import withRecoilFlow from storybook-addon-recoil-flow/dist/decorator within your story and put it into the decorators array (in the right order)

Method 3: Just use the RecoilRoot provided by the decorator

  • Install via npm / yarn
  • The decorator provides a RecoilRoot with overrides set to false so the method in 1 will work without another decorator (but you'll not be able to set up a custom initialiser)

Screenshot 1

Screenshot 2

Parameters

The recoilFlow parameter has the following optional options:

  recoilFlow: {
    filter: {
      keys: ["AtomOne"],
      showConnected: true,
    },
  },

The keys array gets used in a .startsWith to filter out nodes so the long generated SelectorFamilyKeys can be matched with just the manually entered bit.

showConnected will show nodes which are connected to those in the keys array as well (defaults to true)

Known issues

  • if the plug-in panel is after certain other plugins (e.g "Interactions" there's a bug in Storybook's css which'll cause this plugin to render improperly.

Keywords

FAQs

Last updated on 14 Mar 2024

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc