Skip to main content

Multiple Alpine Components on Page: Events and Parameters

Premium
3:21

The Full Lesson is Only for Premium Members

Want to access all of our courses? (30 h 09 min)

You also get:

55 courses
Premium tutorials
Access to repositories
Private Discord
Get Premium for $129/year or $29/month

Already a member? Login here

Comments & Discussion

A
alin ✓ Link copied!

Hi!

I have a simple(i think) question. If i change the event name to camelCase, so to cartChanged, instead of cart-changed, it stops working. Is this normal behavior?

M
Modestas ✓ Link copied!

Hi, the events on alpinejs end should be a kebab-caes and contain only lowercase letters. In general, I personally use kebab-case for all front-end facing events :)

A
alin ✓ Link copied!

Thank you, Modestas!

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.