Skip to content

[Bug]: V8: useAddonState missing from @storybook/preview-api #26426

Answered by sballesteros
sballesteros asked this question in Help
Discussion options

You must be logged in to vote

I can confirm that with v8 we can access the storybook/viewport state from preview.js with:

import { useGlobals } from '@storybook/preview-api';

and

const [{viewport}] = useGlobals();

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@sballesteros
Comment options

@sballesteros
Comment options

@sballesteros
Comment options

Answer selected by sballesteros
@keithnickas
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #26425 on March 11, 2024 22:40.