When using useStoryblokState, the hook expects story to have types of ISbStoryData which definition you can find in storyblok-js-client package in storyblok-js-client/dist/types/interfaces.d.ts. And StoryblokStory deviates in only 2 properties: parent_id and paths.
Quick Solution
We do what I did in this PR.
Better (?) Solution
We install storyblok-js-client and extendsISbStoryData interface. 🤷
@snikidev thanks for your hotfix - I rather don't grab external types - if the changes are this rare I rather keep the dependency tree as small as possible
Issue
When using
useStoryblokState
, the hook expects story to have types ofISbStoryData
which definition you can find in storyblok-js-client package instoryblok-js-client/dist/types/interfaces.d.ts
. AndStoryblokStory
deviates in only 2 properties:parent_id
andpaths
.Quick Solution
We do what I did in this PR.
Better (?) Solution
We install storyblok-js-client and
extends
ISbStoryData
interface. 🤷