Skip to content

Commit

Permalink
fix(website): continuous re-render
Browse files Browse the repository at this point in the history
  • Loading branch information
sperka authored and JeremyJonas committed Nov 6, 2023
1 parent 19ac337 commit d1ddff5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions demo/api/generated/runtime/python/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,15 @@ export function managedContentFactory<
[setItems],
);

const active = useDebounce(last(last(items)), 50);
const active = useDebounce<ManagedAppLayoutContent | undefined>(last(items), 50);
const [activeUUID, activeNode] = active || [];
const context = useMemo<IManagedAppLayoutContentContext>(
() => ({
active,
active: activeNode,
addContent,
removeContent,
}),
[active],
[activeUUID],
);

return <Context.Provider value={context}>{children}</Context.Provider>;
Expand Down

0 comments on commit d1ddff5

Please sign in to comment.