meiosis-vanillajs
v0.8.0
Published
meiosis-vanillajs
Downloads
15
Maintainers
Readme
Meiosis-VanillaJs
Meiosis-VanillaJs is a Meiosis renderer for Vanilla JS. It is suitable for plain HTML strings, jQuery, template engines such as Handlebars, and anything else that produces HTML strings.
You can install it with npm
:
npm i --save meiosis-vanillajs
Then use it along with Meiosis:
import { createComponent, run } from "meiosis";
import { renderer } from "meiosis-vanillajs";
const Main = createComponent({...});
run({ renderer: renderer().intoId(document, "app"), rootComponent: Main });
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 meiosisVanillaJs
global variable.
The Meiosis Guide contains a simple counter example that also uses jQuery.
You will also find two TodoMVC examples in the meiosis-examples repository, one that uses Vanilla Js and one that uses jQuery.
--
Meiosis is developed by foxdonut (@foxdonut00) and is released under the MIT license.