storyblok / react-next-boilerplate

Nextjs Storyblok boilerplate
https://www.storyblok.com/tp/add-a-headless-cms-to-next-js-in-5-minutes
64 stars 34 forks source link

FIX ISSUE #17 UPDATING STORY WITHOUT PREVIEW #21

Closed Kubessandra closed 3 years ago

Kubessandra commented 3 years ago

The original story will not update if we are not in preview mod.

This Pull request add a useEffect to detect changes in the props and update the current story if we pass another story by props. Without this the story only update if we are in preview can't be updated if we are not in preview.

ISSUE #17

samuells commented 3 years ago

Checked by @fgiuliani 👍