Use Alpine.js with Jeasx

Alpine.js adds behavior right in your markup: import it in a browser bundle and put x- attributes into your JSX.

The coffee bar below is a component registered with Alpine.data() in index.js. The menu comes from the server as JSON in x-data, x-model binds the choices, getters compute the prices and x-for renders the order.

Build your drink

Drink
Size
Extras
Medium Cappuccino€3.40

Your order

Nothing here yet. Add a drink!

Total