chore(lint): silence set-state-in-effect in TaskItem
eslint-plugin-react-hooks 7.1 (pulled by eslint-config-next 16.4.3) now flags the draft-reset effect. Same justified disable as ThemeToggle; deriving the drafts from props is a refactor outside the bump. Refs #171 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
903c5a034f
commit
0be70f2f5e
1 changed files with 4 additions and 0 deletions
|
|
@ -69,6 +69,10 @@ export function TaskItem({ task, subtasks = [], depth = 0 }: TaskItemProps) {
|
|||
|
||||
// Sync state when task prop changes
|
||||
useEffect(() => {
|
||||
// The edit fields are local drafts reset from the task the list reloads.
|
||||
// Flagged since eslint-plugin-react-hooks 7.1 (#171); deriving the drafts
|
||||
// from props instead is a refactor outside a dependency bump.
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setTitle(task.title);
|
||||
setNotes(task.notes || "");
|
||||
setPriority(task.priority);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue