8000 HyperScript engine does not work properly with For · Issue #2453 · solidjs/solid · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
HyperScript engine does not work properly with For #2453
Open
@grimalschi

Description

@grimalschi

Describe the bug

Function "For" in HyperScript mode loses connection with signals when list changes.

Your Example Website or App

https://playground.solidjs.com/anonymous/2103f083-762b-40be-b23f-114309a0142f

Steps to Reproduce the Bug or Issue

  1. Click "add"
  2. Click "demo"

Image

Expected behavior

Here is correct behavior using TSX:
https://playground.solidjs.com/anonymous/9392c73a-cd81-4260-9f23-508104380960

Image

Screenshots or Videos

No response

Platform

  • OS: macOS
  • Browser: Vivaldi
  • Version: 7.0.3495.29

Additional context

I have also checked html`` function, it works as expected (https://playground.solidjs.com/anonymous/5e9b68a0-5d8f-4f30-8ec3-d4c8fb24f766).

The closest solution is to wrap children in function (https://playground.solidjs.com/anonymous/32865f62-3ba6-45f3-a0a1-e8bc9adced6a),
but in this case Solid redraws all children everytime I add new element in array, which is undesired behavior.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0