diff --git a/stories/useStateWithHistory.story.tsx b/stories/useStateWithHistory.story.tsx index 0549350816..1ce477f8d1 100644 --- a/stories/useStateWithHistory.story.tsx +++ b/stories/useStateWithHistory.story.tsx @@ -24,7 +24,7 @@ const Demo = () => { return; } - window.history.back(stepSize); + history.back(stepSize); }, [history, stepSize] ); @@ -35,7 +35,7 @@ const Demo = () => { return; } - window.history.forward(stepSize); + history.forward(stepSize); }, [history, stepSize] ); @@ -60,12 +60,12 @@ const Demo = () => { Current state: {state}