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

Vdom outside render loop #74

Merged
merged 2 commits into from Apr 9, 2017
Merged

Vdom outside render loop #74

merged 2 commits into from Apr 9, 2017

Conversation

refractalize
Copy link
Member

This fixed an issue that has been with hyperdom/plastiq since the beginning. DOM event handlers have always needed to refresh the view after they run, and to do this they needed to have been recognised during the render loop. A consequence of this was that defining VDOM with event handlers outside of the render loop meant that those event handlers didn't refresh the view, which is annoying and a bit confusing.

This PR fixes that issue. Now, VDOM with event handlers can be prepared beforehand, outside the render loop, statically, and be used in various places in the VDOM. This allows VDOM to be defined once and reused - which can dramatically improve performance.

CC @dereke

@dereke
Copy link
Member

dereke commented Apr 5, 2017

This sounds great!
I think there are some docs in readme about this so probably should update that.
Nice one!

@joshski
Copy link
Member

joshski commented Apr 5, 2017

👍🏻

@refractalize refractalize merged commit 7c5d5f4 into master Apr 9, 2017
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

Successfully merging this pull request may close these issues.

None yet

3 participants