Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

As a maintainer of Lit, this statement seems a little off to me:

> Another thing- should we be building a router with web components? Eh... maybe not? Lit seems to think (it would be helpful and useful)[1]. But there are a lot of considerations you have to handle with your own implementation that framework routers have already solved. Web components also add another level of security you need to be aware of.

The Lit Labs router isn't a web component. It's a Lit reactive controller that lets you define a router separately from a component, but attach it to a component so that the component updates when routes change. So we're saying don't make your router a web component (ie `<my-route path="...">`

Also there isn't another level of security web components. They're implemented in script just like a router. Script running in a page can do all kinds of things.

[1]: https://www.npmjs.com/package/@lit-labs/router



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: