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

Remove generics from virtual dom #783

Merged
merged 6 commits into from
Dec 8, 2019
Merged

Conversation

jstarry
Copy link
Member

@jstarry jstarry commented Dec 8, 2019

Problem

It's not possible to create arbitrary HTML fragments with associating with a component because virtual dom nodes require a component type for callback activation.

Solution

Remove the macro magic which activates callbacks behind the scenes and make it an explicit process.

Virtual dom nodes are no longer genericised and arbitrary HTML fragments are easier to create and the typing of children nodes is much simpler (thanks to @kellytk for the suggestion).

Note: Side effect is that closures are no longer valid properties on their own and the macro parsing logic is simpler as a result

Fixes: #743
Fixes: #762
Fixes: #738

@jstarry jstarry merged commit f61667b into yewstack:master Dec 8, 2019
@jstarry jstarry deleted the vdom-degenerify branch December 8, 2019 18:47
llebout pushed a commit to llebout/yew that referenced this pull request Jan 20, 2020
* Fix tests

* Remove generics from virtual dom

* Prep for degenerify

* Fix examples

* Remove props cloning

* Fix tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant