Enable Alpine.data() to accept an array/object #4834
bones-1
started this conversation in
3. Feature ideas
Replies: 3 comments 1 reply
|
What would you expect |
0 replies
|
Additionally, most of the time, I would do separating out parts into modules that just export a import thing from './thing.js'
import other from './other.js'
Alpine.plugin([thing, other]) |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Disclaimer, I am learning, so pardon any "why the hell did he do that" that you see. That said, how about adding an overload to Alpine.data , so that it allows to easily use multiple module objects (from app.js/ts). I have included an example in the picture below:
Imagine it being called like
Alpine.data(["database", "notes"]);is. I beleive this that this will lead to cleaner code with little readability tradeoffAll reactions