Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Repeated call syntax in JSX breaks reactivity #2134

Closed
deluksic opened this issue Apr 17, 2024 · 1 comment
Closed

[Bug] Repeated call syntax in JSX breaks reactivity #2134

deluksic opened this issue Apr 17, 2024 · 1 comment
Labels
bug Something isn't working compilation

Comments

@deluksic
Copy link

Describe the bug

Having someSignal()() inside JSX breaks reactivity.

Your Example Website or App

https://playground.solidjs.com/anonymous/a27d79e6-d87f-4361-ad2b-512cd32c6d18

Steps to Reproduce the Bug or Issue

  1. Click the first counter a few times to make it different than the second counter
  2. Toggle between the counters using the third button

Expected behavior

I expect Result (broken) to match Result (works).

Screenshots or Videos

No response

Platform

All

Additional context

Discussion on discord https://discord.com/channels/722131463138705510/751355413701591120/1229427809173377144

@deluksic deluksic changed the title Repeated call syntax in JSX breaks reactivity [Bug] Repeated call syntax in JSX breaks reactivity Apr 17, 2024
@ryansolid
Copy link
Member

Yeah this is a compiler error.. when it detects it can avoid the wrapper and pass in the signal directly there is no new wrapper made. It turns out that we prematurely remove the wrapper when there are double function calls.

@ryansolid ryansolid added bug Something isn't working compilation labels Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working compilation
Projects
None yet
Development

No branches or pull requests

2 participants