It doesn't help to share state between the front and the backend. What apline.js really excels at is managing state on the frontend itself, especially for UI. For example, if you need to click on one thing that shows another thing, or you need to swap out ui elements it helps to make that easier.
For communicating the backend through using an api, or issuing async get/post or form submissions that is done pretty much the same as you would do it using html or javascript.
Yeah as folks said below - Rails provides data to alpine, and alpine manages state based on initial value. But you can do regular XHR requests from alpine too, since it has regular functions which you can call
Alifatisk|1 year ago
zoidb|1 year ago
For communicating the backend through using an api, or issuing async get/post or form submissions that is done pretty much the same as you would do it using html or javascript.
imacrayon|1 year ago
avdept|1 year ago
mediumsmart|1 year ago
unknown|1 year ago
[deleted]
unknown|1 year ago
[deleted]
unknown|1 year ago
[deleted]