mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-02 05:03:44 +08:00
Don't use STORIES_CONFIGURED
to tell if the stories changed now
This commit is contained in:
parent
7616d76326
commit
3c089a8510
@ -11,9 +11,8 @@ import React, {
|
||||
} from 'react';
|
||||
|
||||
import {
|
||||
STORIES_CONFIGURED,
|
||||
STORY_CHANGED,
|
||||
SET_STORIES,
|
||||
STORY_CHANGED,
|
||||
SELECT_STORY,
|
||||
SHARED_STATE_CHANGED,
|
||||
SHARED_STATE_SET,
|
||||
@ -380,7 +379,7 @@ export function useSharedState<S>(stateId: string, defaultState?: S) {
|
||||
[`${SHARED_STATE_SET}-client-${stateId}`]: (s: S) => setState(s),
|
||||
};
|
||||
const stateInitializationHandlers = {
|
||||
[STORIES_CONFIGURED]: () => {
|
||||
[SET_STORIES]: () => {
|
||||
if (addonStateCache[stateId]) {
|
||||
// this happens when HMR
|
||||
setState(addonStateCache[stateId]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user