Skip to content

1. task count not updating in Alltask UI. 2. Empty task object on first CreateTask.  #7

@sirajshaikh-dev

Description

@sirajshaikh-dev

Key Improvements for the Update:

  1. Immutability Fix:
    The original code directly modifies userData by using elem.tasks.push() and updating elem.taskCounts in the loop. This breaks React’s immutability principles.
    Updated logic will create new references for tasks and taskCounts.
  2. State Simplification:
    Instead of managing a newTask object separately, directly construct the task inside the loop for better readability.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions