CodingNic

Persistence

Test the Persistence Flow

Persistence 12 min read

Test the Persistence Flow

Test the Persistence Flow

Before moving on, test the complete persistence cycle rather than checking only one action.

Use this sequence:

  1. create a new task
  2. move it to another column
  3. delete one of the original sample tasks
  4. refresh the page
  5. confirm the board still matches the state from before the refresh

Then open Local Storage and confirm the kanbanTasks entry is still present.

If the board resets, check the order of your startup code. The saved data must be loaded before renderTasks() runs.

If one type of change disappears after refresh, check that saveTasks() is called in that specific action’s state-change path.

Checkpoint

All three task actions—create, delete, and move—should survive a page refresh.

The board is now a small persistent browser application rather than a page that only holds temporary state.