Request to update docs for x-modelable #3326
marshnmedia
started this conversation in
3. Feature Ideas
Replies: 1 comment
-
|
You can make the PR. |
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This is a request that might help others out, and save them the time I spent trying to understand how to best build reusable components in Laravel that use AlplineJS. The current example does not do a great job of describing the power of x-modelable. Specifically, that you can use x-model again inside a child element with an x-modelable declared. I glanced over it at first and didn't understand it.
Currently it looks like this:
Notice there is nothing else using x-model inside the child component.
Something like this would better describe the power of "exposing state to the outside through x-model as if it were a native input." Notice the input inside the child element that also has the x-model set.
reference: I found this here: https://stackoverflow.com/questions/71694468/alpinejs-catch-child-component-value-if-set/71702749#71702749
Beta Was this translation helpful? Give feedback.
All reactions