Skip to content

throwing in onCleanup callback breaks reactivity #2496

@mizulu

Description

@mizulu

Describe the bug

throwing in onCleanup breaks reactivity

For example a <Comp> is conditionally rendered and it has a cleanup hook
when the condition become falsy, the cleanup will be called
and if the callback throws an exception, the dom update will fail, and application
state will be broken.

Your Example Website or App

https://playground.solidjs.com/anonymous/2d9028af-fa5d-489a-a84f-9a571b7a44d6

Steps to Reproduce the Bug or Issue

see reproduction playground link

Expected behavior

throwing in onCleanup callback should not break application reactivity.

additional consideration is that users might still want to see the exception

Screenshots or Videos

No response

Platform

playground

Additional context

No response

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