Alpine: Templates? Custom tags?

Created on 13 Jan 2020  路  5Comments  路  Source: alpinejs/alpine

Can you implement a support for templates and custom tags similar to this?

Most helpful comment

Alpine would be a life saver for us. This won't save us any problems more than it will generate. In Vue for example, at the end of the day you will find yourself dealing with xMB bundles. Then, you try to solve the issue by using a static site generator for SSR and code splitting or worst, a custom back-end implementation for SSR. Then you use nodejs with PHP for SSR which doesn't make sense at all. We shouldn't do the same mistake over and over. Let's get back to Regular DOM for the sense of our minds.

All 5 comments

Alpine isn't intended for this. Alpine is designed to work with your existing markup, using a Vue-like syntax. Adding templates requires some sort of compiled / transpiler and heavier bundles.

Alpine would be a life saver for us. This won't save us any problems more than it will generate. In Vue for example, at the end of the day you will find yourself dealing with xMB bundles. Then, you try to solve the issue by using a static site generator for SSR and code splitting or worst, a custom back-end implementation for SSR. Then you use nodejs with PHP for SSR which doesn't make sense at all. We shouldn't do the same mistake over and over. Let's get back to Regular DOM for the sense of our minds.

Alpine would be a life saver for us. This won't save us any problems more than it will generate. In Vue for example, at the end of the day you will find yourself dealing with xMB bundles. Then, you try to solve the issue by using a static site generator for SSR and code splitting or worst, a custom back-end implementation for SSR. Then you use nodejs with PHP for SSR which doesn't make sense at all. We shouldn't do the same mistake over and over. Let's get back to Regular DOM for the sense of our minds.

馃挴. Keep your DOM, forget the VDOM. Everyone's lives are so much easier!

Alpine would be a life saver for us. This won't save us any problems more than it will generate. In Vue for example, at the end of the day you will find yourself dealing with xMB bundles. Then, you try to solve the issue by using a static site generator for SSR and code splitting or worst, a custom back-end implementation for SSR. Then you use nodejs with PHP for SSR which doesn't make sense at all. We shouldn't do the same mistake over and over. Let's get back to Regular DOM for the sense of our minds.

馃挴. Keep your DOM, forget the VDOM. Everyone's lives are so much easier!

Well then, i invite you to visit any other big website/webapp (like youtube) and look at it's rendered page source. It's easier to roll your own components, rather than stumble through ids and classes.

I think alpinejs + grapesjs snippets could just solve all this.
Worstcase, you could get creative with importing templates and modules.
Does alpinejs work with template-tags?

https://www.html5rocks.com/en/tutorials/webcomponents/imports/

Was this page helpful?
0 / 5 - 0 ratings

Related issues

adinata-id picture adinata-id  路  4Comments

zaydek picture zaydek  路  3Comments

dkuku picture dkuku  路  5Comments

BernhardBaumrock picture BernhardBaumrock  路  3Comments

hkan picture hkan  路  3Comments