-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Plugins #102
Comments
There's an existing pattern you can use for your jQuery needs. You can read the background here. Choo (before replacing morphdom) used this for components. Essentially, you want to attach an Let me know if that helps. EDIT: here's the relevant test: https://github.com/patrick-steele-idem/morphdom/blob/test/browser/test.js#L787 here's a note in the docs: https://github.com/patrick-steele-idem/morphdom/blob/master/docs/virtual-dom.md |
It looks like the aforementioned jquery solution would have helped solve what I set out to solve prior to creating morphdom-plugins, however I solved it in a different way with the plugin approach discussed above. I think that, regardless of application, being able to compose together multiple morphdom configs would be very valuable, which was the original ask of this issue. |
closing for now. Feel free to reopen! |
We've been using morphdom at RetailMeNot, and it has worked great for our needs. Thanks to morphdom we are developing with a flux-like workflow without tying ourselves to an opinionated framework such as react.
Although for the most part, the switch to morphdom has gone smoothly, we found we lost the ability to easily code jquery-based animations, since morphdom can alter the dom with the state coming out of our templates whenever our state changes.
I set out to solve this problem, and quickly found that doing so in a sane way with morphdom's existing configuration options would prove to be challenging–so I set out to create a "plugin system" for morphdom. In practice, what I came up with is more of a composable config pattern, but it works great for our needs and I thought you may be interested in being such config composibility to morphdom itself. Find that code here.
I have open sourced the code we use to do animations with morphdom, as well as the code that composes multiple morphdom configurations into a single configuration. You can find it in the RetailMeNotSandbox github account here: https://github.com/RetailMeNotSandbox/morphdom-plugins.
I am curious if there is any interest in introducing the ability to compose configs to morphdom. If so, is there anyway I can help make that happen? Let me know if you have any questions. I would be more than willing to help answer them.
The text was updated successfully, but these errors were encountered: