alpinejs / alpine

A rugged, minimal framework for composing JavaScript behavior in your markup.
https://alpinejs.dev
MIT License
28.19k stars 1.23k forks source link

Document integration with morphdom-based libraries or frameworks #987

Closed juddkirby closed 3 years ago

juddkirby commented 3 years ago

Hi there,

I mentioned in #826 that I thought it might be useful to add some documentation in the README on how to integrate Alpine with libraries that use morphdom under the hood.

I came about this issue whilst using Alpine within https://github.com/unabridged/motion in my Rails app. Motion didn't have any issues about it specifically so I came the long way around through LiveView, and then StimulusReflex, after seeing the same state problem in my application.

Given that the commonality is morphdom, and that if an application is using morphdom and alpine together it's highly likely to occur at some point, and can be a lengthy debug process, why not deal with it early when the user is setting up, and save them some headache.

I was thinking a section that outlines the solution for each of the frameworks that we know of so far, and then a general morphdom solution may help other users more easily find the information. This could be at the end of the installation process, an optional step for framework users.

What does everyone think? I'm happy to write it up and submit a PR, just wanted to check in first

HugoDF commented 3 years ago

I think @calebporzio left a comment on the LiveView repo to help them out with their integration.

juddkirby commented 3 years ago

Yep, that's right @HugoDF, to assist in the implementation within LiveView to then allow Alpine users to hook into morphdom. That's

I'm only suggesting to add something to Alpine docs to bring users awareness to known support/implementations for other libraries/frameworks such as the one for LiveView, in order to smooth out the developer experience