This PR adds support for rendering into arbitrary DOM nodes in the same way that rendering into the body worked previously, with one exception: blocking.
RenderBody remains blocking, since it effectively becomes a helper that 90% of Vecty applications will rely on, whereas RenderInto and RenderIntoNode which are introduced in this PR do not block. This is because:
a. Anyone rendering Vecty into arbitrary DOM nodes will likely want to do it more than once, so making the API of these functions non-blocking makes sense.
b. Anyone using these functions will be a more advanced user and understand when blocking is / is not needed.
In order to land this PR earlier for users who need this functionality, tests will not be added for the new functionality. They will be added in a follow-up as part of #168.
This PR adds support for rendering into arbitrary DOM nodes in the same way that rendering into the
body
worked previously, with one exception: blocking.RenderBody
remains blocking, since it effectively becomes a helper that 90% of Vecty applications will rely on, whereasRenderInto
andRenderIntoNode
which are introduced in this PR do not block. This is because:a. Anyone rendering Vecty into arbitrary DOM nodes will likely want to do it more than once, so making the API of these functions non-blocking makes sense. b. Anyone using these functions will be a more advanced user and understand when blocking is / is not needed.
In order to land this PR earlier for users who need this functionality, tests will not be added for the new functionality. They will be added in a follow-up as part of #168.
Fixes #81 Fixes #247