Skip to content

tutorial: API routes / POST handlers | not updating correctly #14102

@stephane-vanraes

Description

@stephane-vanraes

Describe the bug

https://svelte.dev/tutorial/kit/post-handlers

adding a todo does not update the page until it refreshes (add some spaces to the code)
somehow the deep reactivity is broken


changing the part where you add the todo to the list to a more "v4-style" does work correctly

data = {
  ...data, 
  todos: [...data.todos, {
     id,
     description
  }
]}

Reproduction

go to https://svelte.dev/tutorial/kit/post-handlers
click 'solve'
add a todo -> nothing changes
add whitespace in code editor -> todo appears!!

Logs

No response

System Info

whatever the tutorial runs on :)

Severity

annoyance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions