Skip to content

Fix missing dependency array in Template.tsx useEffect#42

Merged
SCdF merged 1 commit intomainfrom
fix-template-useeffect-deps
Jan 20, 2026
Merged

Fix missing dependency array in Template.tsx useEffect#42
SCdF merged 1 commit intomainfrom
fix-template-useeffect-deps

Conversation

@SCdF
Copy link
Owner

@SCdF SCdF commented Jan 20, 2026

Summary

  • Fixed a bug where the setContext useEffect in Template.tsx had no dependency array, causing it to run on every render
  • Added proper dependencies [dispatch, template?.title] to only run when those values change

Test plan

  • Verify the template edit page still sets the correct page title
  • Verify the title updates when the template title changes
  • Verify no excessive re-renders occur

🤖 Generated with Claude Code

The setContext useEffect had no dependency array, causing it to run on
every render. Added [dispatch, template?.title] to only run when those
values change.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@SCdF SCdF marked this pull request as ready for review January 20, 2026 08:36
@SCdF SCdF merged commit a818b99 into main Jan 20, 2026
2 checks passed
@SCdF SCdF deleted the fix-template-useeffect-deps branch January 20, 2026 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant