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

I have. We used stimulusjs otherwise and wrote a controller that took in a component name and JSON props (embedded in HTML as a data attribute).

It works well. You end up with HTML like:

<div data-controller=“component” data-name-component-value”example” data-props-component-value=“{a: 1}”></div>



Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: