
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
storybook-addon-react-live-edit
Advanced tools
storybook.js addon providing live react story editing and preview

yarn add -D storybook-addon-react-live-edit
To get this addon in your story book you have to register the panel, addLiveSource story creator
and optionally add a scope decorator to make additional components and utilities available in live editor scope
Add to .storybook/addons.js
import 'storybook-addon-react-live-edit/dist/register';
addLiveSource story creatorAdd to .storybook/config.js
import {setAddon} from '@storybook/react';
import LiveEdit, {setOptions} from 'storybook-addon-react-live-edit';
setOptions({ theme: 'darcula', presets: ['react'] });
setAddon(LiveEdit);
withLiveEditScope story decoratoraddDecorator to .storybook/config.js
import {addDecorator} from '@storybook/react';
import {withLiveEditScope} from 'storybook-addon-react-live-edit';
import ExternalComponent from 'a-apackage';
addDecorator(withLiveEditScope({ ExternalComponent }));
or
addDecorator to particular stories
import {withLiveEditScope} from 'storybook-addon-react-live-edit';
import ExternalComponent from 'a-apackage';
storiesOf("Demo", module)
.addDecorator(withLiveEditScope({ React, ExternalComponent }))
.addLiveSource('demo', `return <div>{scopeTest}</div>`);
When LiveEdit addon is registered with storybooks setAddon function new method addLiveSource
to add a story from source provided as a string. This source can be edited in "Live edit" panel
storiesOf("Demo", module)
.addLiveSource('demo', `return <div>{scopeTest}</div>`);
or
You can use withLiveEdit story creator
storiesOf("Demo", module)
.add('demo', withLiveEdit(`return <div>{scopeTest}</div>`));
addLiveSourceaddLiveSource(name, source[, scope])
name (string, required) - the story namesource (string, required) - story source to be rendered in preview and
available for editing in "Live edit" panelscope (object, optional) - variables provided to rendered story,
these can be additional components, utilities or any other data.
Scope is merged with all variables previously provided
by withLiveEditScope decorators.withLiveEditwithLiveEdit(source[, scope])
source (string, required) - story source to be rendered in preview and
available for editing in "Live edit" panelscope (object, optional) - variables provided to rendered story,
these can be additional components, utilities or any other data.
Scope is merged with all variables previously provided
by withLiveEditScope decorators.withLiveEditScope decoratorwithLiveEditScope(scope)
scope (object, required) - variables provided to rendered story,
these can be additional components, utilities or any other data.
Scope is merged with all variables previously provided
by withLiveEditScope decorators. React should be imported and provided within the scope object.To run provided example execute following command, storybook will run on port 3000
yarn example
FAQs
storybook.js addon providing live react story editing and preview
We found that storybook-addon-react-live-edit demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.