WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
Discussion options

You must be logged in to vote

#2605 Seems to have an answer that works for my use case.

The problem was I was approaching things as if Alpine only initialized components one time at Alpine.start() and never tried again. However, after attempting the answer outlined in this comment, it seems that the issue is that HTMX has not fully loaded into the DOM before Alpine attempts to initialize it, resulting in Alpine components failing.

I can only assume that inline x-data was working more smoothly because Alpine was able to recognize it right away when htmx brought it in, whereas it needed more time to recognize the other two methods (Alpine.data() and/or function calls)

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by quick-111
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant