solidjs / solidjs/solid

Updating onchange causes sibling to mount/unmount

Open
#1,742 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
36.1k
Forks
1.1k
Avg merge
9h 18m
Merged PRs (30d)
195

Description

Describe the bug

https://playground.solidjs.com/anonymous/551fc377-eef8-4688-a32e-d136eb295d83

Weather updating onchange is a good idea, or even supported, in my case a bug where by untrack wasn't used at the callsite, it is still strange to see LogComponent which is an unrelated sibling, mount and unmount each time the tickTocktick signal is updated.

Your Example Website or App

https://playground.solidjs.com/anonymous/551fc377-eef8-4688-a32e-d136eb295d83

Steps to Reproduce the Bug or Issue

Run playground see unrelated component mount and unmount on each signal (although its not dependent on that signal)

Expected behavior

Not sure, but not this

Screenshots or Videos

No response

Platform

Latest

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked Solid playground and reproduce the mount/unmount behavior while updating the tickTocktick signal through onchange. Trace the relationship between onchange, untrack, and LogComponent's sibling position to determine why the sibling remounts. Done means the behavior is understood and the unrelated sibling no longer mounts and unmounts unexpectedly, or the expected behavior is clarified.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.