It's not a library. It's a simple pattern.
Do you Mei-O?
Meiosis is an architecture pattern to manage the data flow of your web applications. All you need is a simple stream library such as Flyd or Mithril Stream to implement the pattern. Or, you could implement the pattern yourself with just a few lines of code. You do not need anything else, not even Meiosis itself. Add your favourite virtual dom library (React, Mithril, Snabbdom, Inferno, Preact, etc.) and you are good to go.
Meiosis is an approach to managing the data flow of your web application that frees you from being tied to a library API.
Meiosis does provide code to be combined with Meiosis-Tracer during development. This is a nifty and useful tool to view what is going on in your application. You can trace back through snapshots of the model and see the changes in the UI. You can also change the model directly in the tool to see the resulting UI, and, if you are using events, simulate behaviour by triggering new events.
For documentation please refer to the Meiosis Wiki.
Try out the examples online: http://meiosis.js.org/examples.html
Example code: https://github.com/foxdonut/meiosis-examples
Please post questions and suggestions as Github issues on the meiosis repository.
You can also chat on the Gitter channel.
Please note that Meiosis v0.9.x has been archived and is still available for reference purposes here.
Why the name Meiosis?
I picked the name Meiosis for three reasons:
- it's a biology term for a type of cell division; this is an analogy to the idea of dividing your application into smaller pieces;
- it's a figure of speech that intentionally understates something or implies that it is lesser in significance or size than it really is, meaning that this is meant to be small, humble, and not replace what people use, just improve upon it; and
Meiosis is the result of a whole adventure of exploring other architectures. Credit goes to their authors; I am grateful for their work and that of their respective communities.
- CycleJS driven by state by Christian Alfoni. This article was very inspirational to me and I am very grateful to Christian! I also find Christian's other projects very interesting, including (but not limited to) Cerebral and function-tree.
- The SAM pattern by Jean-Jacques Dubray. There are some very sound principles to the SAM pattern, and I very much appreciate discussing and learning from Jean-Jacques as he is always gratious and willing to share his knowledge and experience.
- Simon Friis Vindum, creator of Flyd, Snabbdom, and others. I use Flyd as a stream library for Meiosis.
- Mithril and its fantastic community. Special thanks to James Forbes for all the help, sharing your knowledge, and discussing ideas!
- Vesa Karvonen, creator of partial.lenses and Calmm.
- The Elm Architecture, by Evan Czaplicki.
- Redux, by Dan Abramov.
- hyperapp, by Jorge Bucaran.
- CycleJS, by André Staltz/Medeiros.
- Other reactive Libraries such as RxJS, Kefir, most, and Bacon.js.
Meiosis is developed by foxdonut (@foxdonut00) and is released under the MIT license.