Skip to content

v1.0.0

Compare
Choose a tag to compare
@CodyJasonBennett CodyJasonBennett released this 21 Sep 18:47
· 41 commits to main since this release

What's Changed

This release implements a <FiberProvider /> component that binds calls to useFiber to the React Fiber tree. This ensures that components get a consistent reference to their respective Fiber regardless of their environment. As such, its-fine is now stable and the API has matured.

Note: pmndrs renderers like react-three-fiber implement this internally to make use of useContextBridge, so you would only need this when using hooks inside of react-dom or react-native.

import * as ReactDOM from 'react-dom/client'
import { FiberProvider } from 'its-fine'

function App() {
  const fiber = useFiber()
}

createRoot(document.getElementById('root')!).render(
  <FiberProvider>
    <App />
  </FiberProvider>,
)

Full Changelog: v0.2.1...v1.0.0