Skip to content
Discussion options

You must be logged in to vote

There isn't any advantage other than very slightly polluting global scope less.

In our project we choose not to use Alpine.data. We use TS with Snowpack for development and Webpack for production. So all the alpine components, etc live in that library scope.

So I'd say it's preference thing at this point. If you don't want to pollute global scope and want short named references to your component code, Alpine.data is decent solution.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@bttger
Comment options

Answer selected by philc-d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants