mirror of
https://github.com/hanzoai/yoga.git
synced 2026-10-30 19:34:29 +00:00
Two thousand and twenty-one packages carried more than one spec across this estate — eslint alone in a hundred and four forms — and a package resolved twice is two copies at run time, which is how react-hook-form came to report "two different types with this name" from files nobody had edited. None do now. The number lives in the catalog: a manifest names the package, the workspace names the version. Where a manifest cannot reach a catalog it still carries the one version, because the table is the source either way.
yoga-layout
This package provides prebuilt WebAssembly bindings for the Yoga layout engine.
See more at https://yogalayout.dev
Usage
import {Yoga, Align} from 'yoga-layout';
const node = Yoga.Node.create();
node.setAlignContent(Align.Center);
Requirements
yoga-layout requires a toolchain that supports ES Modules and top-level await.
If top-level-await is not supported, use the yoga-layout/load entry point instead. This requires to load yoga manually:
import {loadYoga, Align} from 'yoga-layout/load';
const node = (await loadYoga()).Node.create();
node.setAlignContent(Align.Center);