Reinitialising alpine when using Unobstrusive javascript #695
nikhilrayaprolu
started this conversation in
4. General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It is a pattern in rails to use Unobtrusive javascript to insert or replace a previous element in HTML. If a part of html is removed how to reinitialise the alpine component dynamically? https://guides.rubyonrails.org/working_with_javascript_in_rails.html
Adding on, what if HTML partial sent from Rails in an Ajax call using unobtrusive javascript has a x-data tag to initialise an alpine component. How to create a new component dynamically?
Beta Was this translation helpful? Give feedback.
All reactions