diff --git a/code/lib/manager-api/src/index.tsx b/code/lib/manager-api/src/index.tsx index bb7fe0e5ec6c..3b0a21bdcb94 100644 --- a/code/lib/manager-api/src/index.tsx +++ b/code/lib/manager-api/src/index.tsx @@ -411,8 +411,8 @@ export function useSharedState(stateId: string, defaultState?: S) { } }); - const setState = (s: S | API_StateMerger, options?: Options) => { - const result = api.setAddonState(stateId, s, options); + const setState = async (s: S | API_StateMerger, options?: Options) => { + const result = await api.setAddonState(stateId, s, options); STORYBOOK_ADDON_STATE[stateId] = result; return result; };