In the Meiosis Documentation, the Meiosis pattern is setup up either with Function Patches or Mergerino. The idea is that using Function Patches gives you the option of having one less library dependency.
On the other hand, meiosis-setup
takes a "ready-to-use" approach and includes Mergerino as a
dependency. Since Mergerino handles Function Patches, there is no need to choose between the two
when setting up Meiosis with meiosis-setup
. You can use Function Patches and/or Mergerino as you
please:
import { meiosisSetup } from 'meiosis-setup';
const cells = meiosisSetup();
cells().update(...); // Function Patch or Mergerino works
Here is an example:
In the embedded examples, the exported global
Meiosis
is used instead ofimport { meiosisSetup } from 'meiosis-setup'
so that the code works in Flems.