You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is nice because you have more control over when stuff happens, don't rely on special done-autorender behavior.
We'd need to provide a mechanism to do the swapping behavior that done-autorender does for reattachment. With incremental rendering I believe that wouldn't be needed though.
The text was updated successfully, but these errors were encountered:
I'm not sure, what's the common way of doing this in CanJS apps outside of done-autorender? Back in the day I would do something like $('head').html(template(data)).
In other frameworks it's common to define components that project their DOM somewhere else.. this project is a react component that sets the <head> contents.
There's also the long-standing issue about letting a Component control a callbacks.attr instead of a tag.
The problem here is passing data. How do you pass data into this component? It has to be part of its ViewModel most likely. You could use can-bind to mix two ViewModels together (the main component and this one's), but that would be pretty advanced.
So, with that being the case, I think it instead makes more sense if donejs/canjs provides a component whose children are rendered into the <head>. Example:
Currently we rely on done-autorender, a steal extension, to make server rendering and reattachment work. What if instead you could simply do:
development.html
package.json
main.js
This is nice because you have more control over when stuff happens, don't rely on special done-autorender behavior.
We'd need to provide a mechanism to do the swapping behavior that done-autorender does for reattachment. With incremental rendering I believe that wouldn't be needed though.
The text was updated successfully, but these errors were encountered: