News for hackers. Stuff that matters.
Re:Alpine.js by abdusco on Friday January 13, 2023 @06:05AM (#34366250)
Can you use Preact to build on server-rendered HTML?
Re:Alpine.js by dgb23 on Friday January 13, 2023 @06:16AM (#34366326)
Re:Alpine.js by stepbeek on Friday January 13, 2023 @08:13AM (#34367214)
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>