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

@equinor/fusion-framework-react

v8.0.0

Published

React bindings for bootstrapping and consuming a [Fusion Framework](https://github.com/equinor/fusion-framework) instance inside a React application tree.

Readme

@equinor/fusion-framework-react

React bindings for bootstrapping and consuming a Fusion Framework instance inside a React application tree.

Features

  • Framework provider — initialise and distribute the framework via React context with a single component or factory function.
  • useFramework hook — access the active Fusion instance from any descendant component.
  • Module hooks — retrieve individual framework modules (useFrameworkModule) without manual wiring.
  • App hooks — observe the currently active application, query app manifests, and access app-level modules.
  • Context hook — read the currently selected Fusion context.
  • Feature-flag hooks — read, toggle, and observe feature flags at the framework or application level.
  • HTTP hook — obtain pre-configured HTTP clients (portal, people) from the framework.
  • Auth hook — retrieve the currently authenticated user.
  • SignalR hook — subscribe to real-time SignalR hub topics.

Installation

pnpm add @equinor/fusion-framework-react

Usage

Bootstrap the framework (declarative)

import { Framework } from '@equinor/fusion-framework-react';

const App = () => (
  <Framework
    configure={(configurator) => {
      configurator.http.configureClient('my-api', {
        baseUri: 'https://api.example.com',
      });
    }}
    fallback={<span>Loading…</span>}
  >
    <MyApp />
  </Framework>
);

Bootstrap the framework (factory)

import { createFrameworkProvider } from '@equinor/fusion-framework-react';
import { Suspense, useMemo } from 'react';

const Portal = () => {
  const Provider = useMemo(
    () =>
      createFrameworkProvider((config) => {
        config.http.configureClient('my-api', {
          baseUri: 'https://api.example.com',
        });
      }),
    [],
  );

  return (
    <Suspense fallback={<span>Loading…</span>}>
      <Provider>
        <App />
      </Provider>
    </Suspense>
  );
};

Consume the framework

import { useFramework } from '@equinor/fusion-framework-react';

const useMyService = () => {
  const fusion = useFramework();
  return fusion.modules.http.createClient('my-api');
};

Get a specific module

import { useFrameworkModule } from '@equinor/fusion-framework-react';
import type { HttpModule } from '@equinor/fusion-framework-module-http';

const http = useFrameworkModule<HttpModule>('http');

API Reference

Components

| Export | Description | | --- | --- | | Framework | Declarative component that initialises the framework and wraps children in providers. | | FrameworkProvider | Low-level React context provider for an existing Fusion instance. |

Factory

| Export | Description | | --- | --- | | createFrameworkProvider(cb, ref?) | Creates a React.lazy component that initialises the framework asynchronously. Must be rendered inside <Suspense>. |

Core hooks

| Hook | Description | | --- | --- | | useFramework() | Returns the active Fusion instance from context. | | useFrameworkModule(name) | Returns a specific module from the framework by key. |

App hooks (/app)

| Hook | Description | | --- | --- | | useApps(args?) | Lists available app manifests. | | useCurrentApp() | Observes and returns the currently active app. | | useCurrentAppModule(key) | Retrieves a module from the current app. | | useCurrentAppModules() | Observes initialised modules of the current app. | | useAppProvider() | Returns the raw AppModule provider. |

Context hook (/context)

| Hook | Description | | --- | --- | | useCurrentContext() | Returns the currently selected Fusion context. |

Feature-flag hooks (/feature-flag)

| Hook | Description | | --- | --- | | useFeature(provider, key) | Reads and toggles a single feature flag. | | useFeatures(provider, selector?) | Returns all feature flags with optional filtering. | | useFrameworkFeature(key) | Reads a feature flag from the framework provider. | | useFrameworkFeatures() | Returns all framework-level feature flags. | | useCurrentAppFeatures() | Returns feature flags for the current app. |

HTTP hook (/http)

| Hook | Description | | --- | --- | | useFrameworkHttpClient(name) | Returns a pre-configured HTTP client. |

Convenience hooks (/hooks)

| Hook | Description | | --- | --- | | useHttpClient(name) | Returns a framework HTTP client ('portal' or 'people'). | | useCurrentUser() | Returns the authenticated user's account info. |

SignalR hook (/signalr)

| Hook | Description | | --- | --- | | useSignalR(hubId, topicId) | Subscribes to a SignalR hub topic. |

Re-exported types

| Type | Source | | --- | --- | | Fusion | @equinor/fusion-framework | | FusionConfigurator | @equinor/fusion-framework | | AppManifest, AppConfig, AppType, IApp | @equinor/fusion-framework-module-app | | IFeatureFlag, IFeatureFlagProvider | @equinor/fusion-framework-module-feature-flag |

Sub-entry-points

The package exposes several sub-entry-points for tree-shakeable imports:

  • @equinor/fusion-framework-react — core providers and hooks
  • @equinor/fusion-framework-react/app — application hooks
  • @equinor/fusion-framework-react/context — context hooks
  • @equinor/fusion-framework-react/feature-flag — feature-flag hooks
  • @equinor/fusion-framework-react/hooks — convenience hooks
  • @equinor/fusion-framework-react/http — HTTP hooks
  • @equinor/fusion-framework-react/signalr — SignalR hooks