Home / Function/ setTodoComplete() — react Function Reference

setTodoComplete() — react Function Reference

Architecture documentation for the setTodoComplete() function in actions.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  26781e42_b3ef_80b4_30af_96eb0568dfb3["setTodoComplete()"]
  a2e3768b_191e_9986_afcb_87f97e20160d["actions.ts"]
  26781e42_b3ef_80b4_30af_96eb0568dfb3 -->|defined in| a2e3768b_191e_9986_afcb_87f97e20160d
  3c571e48_f75f_74ed_d20e_d5fa9cc70d2d["TodoItem()"]
  3c571e48_f75f_74ed_d20e_d5fa9cc70d2d -->|calls| 26781e42_b3ef_80b4_30af_96eb0568dfb3
  98842fa7_bb50_842d_f839_f1155cf8c2a5["getTodos()"]
  26781e42_b3ef_80b4_30af_96eb0568dfb3 -->|calls| 98842fa7_bb50_842d_f839_f1155cf8c2a5
  style 26781e42_b3ef_80b4_30af_96eb0568dfb3 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

fixtures/flight-parcel/src/actions.ts lines 59–66

export async function setTodoComplete(id: number, isComplete: boolean) {
  let todos = await getTodos();
  let todo = todos.find(todo => todo.id === id);
  if (todo) {
    todo.isComplete = isComplete;
    await fs.writeFile('todos.json', JSON.stringify(todos));
  }
}

Domain

Subdomains

Calls

Called By

Frequently Asked Questions

What does setTodoComplete() do?
setTodoComplete() is a function in the react codebase, defined in fixtures/flight-parcel/src/actions.ts.
Where is setTodoComplete() defined?
setTodoComplete() is defined in fixtures/flight-parcel/src/actions.ts at line 59.
What does setTodoComplete() call?
setTodoComplete() calls 1 function(s): getTodos.
What calls setTodoComplete()?
setTodoComplete() is called by 1 function(s): TodoItem.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free