npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-nitro-yoga

v0.0.1-alpha.15

Published

This package owns Yoga's native build, generated FFI bindings, and Hermes runtime initialization. The `yoga` Git submodule is pinned to `9d159f2d3d8dbc777e1f82c20b94e369c113d608`.

Readme

React Nitro Yoga

This package owns Yoga's native build, generated FFI bindings, and Hermes runtime initialization. The yoga Git submodule is pinned to 9d159f2d3d8dbc777e1f82c20b94e369c113d608.

ffi.config.ts selects the C functions to expose. It uses yoga/yoga as the CMake source directory and yogacore as the native target. The shared builder in react-nitro-ffigen handles generation, type checking, native compilation, and the exported Static Hermes unit.

From the repository root:

git submodule update --init --recursive
bun install

The build needs Bun, Clang, CMake, and Ninja. The root postinstall runs the workspace build scripts in dependency order: Hermes's compiler is built before this package builds native Yoga and generates its bindings. Native builds are incremental and target the macOS host.

To rebuild only Yoga after editing its FFI configuration, run bun run --cwd packages/react-nitro-yoga build from the repository root.

Outputs belong to this package:

  • Generated/native.ts, native.d.ts, api.d.ts, and ffigen_yoga_adapters.h
  • Generated/yoga.c, the exported Static Hermes unit
  • .build/yoga/libyogacore.a, the native library for the host target

The generated sources are checked in so Xcode does not need Bun or CMake during an app build. Regenerate them with this package's build command; do not edit them by hand. The generated native declarations import shared Hermes types from react-nitro-ffigen/hermes.

Import public types from this package:

import type { YGNodeRef } from "react-nitro-yoga";

const node: YGNodeRef = globalThis.yoga.YGNodeNew();
globalThis.yoga.YGNodeFreeRecursive(node);

Declare react-nitro-yoga as a dependency of the consuming package. The type import also declares globalThis.yoga; native initialization must run before application JavaScript uses it.

Package.swift exposes two products:

  • Yoga compiles the submodule's native C++ sources and exposes <yoga/Yoga.h> and import yoga. The renderer depends on this product.
  • ReactNitroYoga compiles the generated C unit and the C++ runtime initializer. It depends on Yoga and Hermes. ReactNitroRuntime calls margelo::nitro::yoga::installHermesBindings for each new Hermes runtime, before application JavaScript runs.

The renderer has no dependency on the Hermes bridge. Its Nitro bindings still use JSI through NitroModules.