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

Playground - Counter example: change version to make counter increment 2 times instead of 1 #27

Open
paritosh149 opened this issue Jun 29, 2021 · 3 comments

Comments

@paritosh149
Copy link

Title: Double increment upon version change
Note: Possible bug in playground (not sure)

Steps:

  1. On Solid JS - Playground, goto counter Example,
  2. as soon as the HTML button is visible, change the version of Solid JS,
  3. Click the Counter Button to observe double increments (increment by 2)

Expected:
After changing the version of SolidJS on Playground, the button should increment by 1

@ryansolid
Copy link
Member

Confirmed as a bug. I can reproduce.

I'm going to move this one to the appropriate repo.

@ryansolid ryansolid transferred this issue from solidjs/solid Jun 29, 2021
@amoutonbrady
Copy link
Member

This is such a weird behavior. There must be some sort of cleanup that's not being properly done on the events handlers when switching versions. I'll investigate. Thanks for bringing that up to my attention.

@amoutonbrady
Copy link
Member

amoutonbrady commented Jul 30, 2021

Implementing the code for the reload button I think I found the place where this is failing, but I've yet to figure out why. Probably a race condition in the way the iframe handle code updates and deregister the previous mounted app, somewhere in there: https://github.com/solidjs/solid-playground/blob/master/src/components/preview.tsx#L152-L181

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants