Closed twifty closed 6 years ago
Thanks @twifty for taking the time to raise and address this issue. I think your approach makes sense. I'll release this as a new minor bump since it changes the behavior a bit, but we're at major version 0.
Published as 0.13.0. There's also a 0.14.0 that includes another change, but I wanted to publish this fix as an independent version in case we run into issues with 0.14.0.
@nathansobo Welcome. Nice to see the functions refs also made it into a release :+1:
A fix for #70
I have modified the virtual node returned by
dom()
to include an array of ambiguous children (those without a known context). On a call toinitialize()
andupdateSync()
those nodes are given the context of the component. Therender
function can then prefer the context over the options object.This way, any children passed in to a components constructor or update method should already have the context of the outer component applied.