x-bind doesn't update an attribute when global $persist variable changed #4434
Unanswered
VladyslavChernyshov
asked this question in
1. Help
Replies: 1 comment
-
Alpine.data is a component factory. The 2 x-data directives generate 2 different set of data so you are toggling the internal variable, not the one associated to the html. For this specific example, you can just remove the internal x-data attribute https://codepen.io/SimoTod/pen/dyxaRWL and it will just work |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
https://codepen.io/Vladyslav-Chernyshov/pen/LYwqyvB
The button updates the
data-bs-theme
key in local storage but it doesn't trigger the x-bind.Any suggestions of how to make it work?
Beta Was this translation helpful? Give feedback.
All reactions