Skip to content

clickfwd/alpine-experiments

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alpine.js Experiments

All of the code in this repository is probably not ready for production use. Feel free to try it, but I'm not guaranteeing anything and won't support you.

Experiments

  • Code Organisation & Separation - repo, url

I used this to look into a nice way of separating component logic using an ES Module syntax. The result was a non-bundled, non-Babel'd collection of JavaScript files that are compatible with all modern major browsers. Only the JavaScript needed for the current page is loaded, based on the components present.

This experiment showcases how you can use Spruce to build a global "toast" system with a nice and clean API. You could actually extract this into a separate object, so that you don't have to call $store.toasts. You could easily create a $toast variable that interacts with $store under the hood.

About

🗻 All of my Alpine.js experiments.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published