meiosis-vue
v0.7.2
Published
meiosis-vue
Downloads
15
Readme
Meiosis-Vue
Meiosis-Vue is a Meiosis renderer for Vue.
You can install it with npm
:
npm i --save meiosis-vue
Then use it along with Meiosis:
import { createComponent, run } from "meiosis";
import { renderer } from "meiosis-vue";
createComponent({
setup: function(propose/actions) {
// create Vue components here, use propose or actions in event handlers
}
});
const model = { store: { ... } };
run(renderer(model, "store"));
You can also download the JavaScript file from the Meiosis builds and add it to your page with a plain <script>
tag. In that case it will be available as the meiosisVue
global variable.
Create your Vue components in the setup
function, and make sure your model has a single root property. In this example, it is store
, but you can name it as you wish. Then, specify the model and the name of the root property when calling renderer(model, rootPropertyName)
.
The Meiosis Guide contains a section about setup explaining its use with Vue.
You will also find a simple counter example and a more elaborate todo-list with server example in the meiosis-examples repository.
--
Meiosis is developed by foxdonut (@foxdonut00) and is released under the MIT license.