Skip to content

Commit 9e3cd0e

Browse files
committed
Remove hook call inside useMemo
1 parent b3e0bf9 commit 9e3cd0e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

packages/scrollycoding/src/focus.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,8 @@ function useEditorStep(
103103
): [number, EditorStep] {
104104
// we merge the editor state from the step with the changes
105105
// requested by the Focus
106+
const { stepIndex, editorStep } = useStepData()
106107
return React.useMemo(() => {
107-
const { stepIndex, editorStep } = useStepData()
108-
109108
const fileName = file || editorStep.northPanel.active
110109
const fileIndex = editorStep.files.findIndex(
111110
f => f.name === fileName

0 commit comments

Comments
 (0)