I am building an MVC 6 vNext web application.
I am considering using the new ViewComponents to encapsulate "widgets" for my site. Widgets should be able to render and function independently of the host view.
We'd like to store CSS and JavaScript references for the component inside of the component definition itself. When we were doing that using partial views, we've had to use a work-around that involved an HtmlHelper that registered the references in the HttpContext and then later rendered them during the _Layout's script section rendering.
I'm wondering if the ViewComponents suffer the same issue or is there a way to handle this more elegantly now?