Mixin and base class that allow easy usage of mobx observables with
The mixin implementation is based heavily on the work of Alexander Weiss in his
mobx-lit-element implementation. This has been rewritten to
support multiple forms of usage (mixin, or base class) as well as to be based on typescript to get type definitions.
As a dependency:
npm install --save @adobe/lit-mobx lit-element mobx
npm install npm run demo
;;;// create a mobx observable// create instance that can be shared across components;// create a new custom element, and use the base MobxLitElement class// alternatively you can use the MobxReactionUpdate mixin, e.g. `class MyElement extends MobxReactionUpdate(LitElement)`
For further examples see the demo folder.
Contributions are welcomed! Read the Contributing Guide for more information.
This project is licensed under the Apache V2 License. See LICENSE for more information.