its-fine hands React components the fiber they live in
🐶🔥 A collection of escape hatches for React.
At a glance
- What is it?
- its-fine is a pmndrs package of escape hatches that lets a React component reach the React Fiber tree, the reconciler container and the nearest parent or child instance, plus a context bridge for sharing React Context across renderers. It works with React 19 and requires a FiberProvider unless you are already inside a renderer that supplies one.
- Who is it for?
- Adopt its-fine if you are building a renderer or an abstraction that has to sit on top of React's internals, such as a three dimensional canvas, because the context bridge and the instance hooks are the parts you would otherwise write yourself. Do not adopt it for ordinary application components, since it couples your code to React internals that are explicitly described as implementation details.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 44 days ago.
- What is it written in?
- Mainly TypeScript, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 6, 2026, and from our analysis. They are not legal advice.
Star history
- pmndrs/its-fine1,187 ★ · +1
| Repository | 2026-10-23 | 2026-11-06 |
|---|---|---|
| pmndrs/its-fine | 1.2k | 1.2k |
1 Stars in the last 14 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
Escape hatches into the reconciler
The package describes itself as a collection of escape hatches for React, and the mechanism is that components become self-aware and can tap into the React Fiber tree, which enables abstractions that modify or extend React behaviour without explicitly taking reconciliation into your own hands. The Fiber is what react-reconciler works on, and the documentation is careful to call it an implementation detail of that reconciler rather than a stable public API. That framing matters more than it might look: the library is a thin, typed layer over internals that React can change, so the contract you are relying on is a convention rather than a promise. The topics attached to the repository say the same thing in a list, with fiber, hooks, internal, react and reconciler.
FiberProvider is the entry point you usually do not need
The provider is a react-internal Fiber provider that binds React children to the React Fiber tree, and the hooks have to be called inside it:
import * as ReactDOM from 'react-dom/client'
import { FiberProvider, useFiber } from 'its-fine'
function App() {
const fiber = useFiber()
}
ReactDOM.createRoot(document.getElementById('root')!).render(
<FiberProvider>
<App />
</FiberProvider>,
)The note on this is the part worth remembering. pmndrs renderers like react-three-fiber implement the provider internally so that they can make use of the context bridge, so you only need FiberProvider yourself when you are using the hooks inside react-dom or react-native. In other words, if you are writing an abstraction for an existing pmndrs renderer, the wiring is already done and adding a second provider is at best redundant. The provider is for people building on top of a primary renderer.
useFiber and useContainer expose the two roots
The two basic hooks give you the two ends of the tree. `useFiber` returns the current react-internal Fiber, which is the node representing the component itself, and it is typed as `Fiber<null> | undefined` so you have to handle the case where there is no provider above you. `useContainer` returns the current reconciler container info passed to `Reconciler.createContainer`, and what that is depends on the renderer: in react-dom it points to the root DOM element, while in react-three-fiber it points to the root Zustand store. The generic parameter lets you type it, for example `useContainer<HTMLDivElement>()`. Together these two give you a way to find out where in the tree you are and what the root of the render is, which is the raw material for the instance hooks.
Nearest child and nearest parent are ref-shaped
`useNearestChild` returns the nearest react-reconciler child instance or the node created from `Reconciler.createInstance`, and `useNearestParent` does the same upwards. Again the type depends on the renderer: a DOM element in react-dom, an instance descriptor in react-three-fiber. Both hooks take an element type so they match a specific kind of node, and omitting the type matches the nearest element of any kind. The return value is a mutable ref object rather than the instance itself, so you read `childRef.current` in an effect on mount, which is what the examples do. That shape is deliberate: a ref is filled in after the commit, so the hook does not force an extra render just to hand you a value.
The context bridge is the reason the library exists
React Context cannot be shared across React renderers, it can only be explicitly forwarded between providers, and the documentation links the upstream issue that tracks the problem. `useContextBridge` returns a `ContextBridge` of live context providers that pierces Context across renderers, and you pass the bridge as a component to a secondary renderer to enable context sharing within its children. The example is the canonical case: a primary renderer, react-dom, holds a context provider, and a secondary renderer, react-nil in the example but also Fabric or react-three-fiber, renders children that read that context. The bridge forwards the live providers, so the value does not have to be copied by hand or serialised across the boundary. The related `useActivityBridge` hook is listed in the table of contents for the same family of problem, and `useContextMap` returns a map of all contexts and their values.
A small package with a strict peer requirement
The package manifest shows how little ships. The runtime dependency list has a single entry, the type definitions for react-reconciler, and the peer dependency is React at version 19 or above, which is a recent floor and tells you this version of the library targets the React 19 era. The build is Vite with a rimraf clean and a TypeScript declaration pass, and the published files are just the `dist/` directory, with a CommonJS entry, an ES module entry, a React Native entry, and the type declarations. The package is marked as having no side effects so bundlers can tree-shake it, and there is a bundle size badge in the README. The tests run on Vitest with jsdom, and there is a separate `test:bundle` script that runs a Node script called `check-bundle.mjs`, which is a check on the built artefact rather than on behaviour, sensible for a package whose whole value is its size.
Where the project stands
The release history is short and recent. v2.1.1 and v2.1.0 were both published on 2026-09-24, the latter about two and a half hours before the former, and v2.0.0 came on 2025-02-18. The last push to the main branch was on 2026-09-24 as well. The package is authored by Cody Bennett and maintained by Paul Henschel, and it lives in the pmndrs organisation, which is the group behind react-three-fiber, and the whole point of the library is that it supports the kind of work that organisation does. The homepage is the npm listing and there is a Discord for the community.
Editorial conclusion
Adopt its-fine if you are building a renderer or an abstraction that has to sit on top of React's internals, such as a three dimensional canvas, because the context bridge and the instance hooks are the parts you would otherwise write yourself. Do not adopt it for ordinary application components, since it couples your code to React internals that are explicitly described as implementation details. Verify first that the React version you use matches the peer requirement of 19 or above, and that the renderer you target provides a FiberProvider, otherwise every hook returns undefined.
Frequently asked questions
What is the pmndrs its-fine package?
It is a collection of escape hatches for React, letting components tap into the React Fiber tree so you can build abstractions that modify or extend React behaviour without taking reconciliation into your own hands.
Do I need to use FiberProvider with its-fine?
The hooks must be called within a FiberProvider, but pmndrs renderers like react-three-fiber implement it internally, so you would only add it yourself when using the hooks inside react-dom or react-native.
What does useContextBridge solve in its-fine?
React Context cannot be shared across React renderers and can only be explicitly forwarded between providers. The hook returns a ContextBridge of live context providers that pierces Context across renderers, and you pass the bridge as a component to the secondary renderer.
What React version does its-fine require?
The peer dependency is React 19 or above, and the current package version is 2.1.1. The runtime dependency list contains only the react-reconciler type definitions, and the package is marked as having no side effects.
What is the difference between useNearestChild and useNearestParent in its-fine?
One returns the nearest react-reconciler child instance and the other the nearest parent instance. In react-dom these are DOM elements, in react-three-fiber they are instance descriptors, and both hooks return a mutable ref you read after mount.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/pmndrs-its-fine)Star history chart for your README
[](https://hysenlabs.com/projects/pmndrs-its-fine)Was this useful?