Back to Fluentui

@fluentui/global-context

packages/react-components/global-context/README.md

4.40.2-hotfix2710 B
Original Source

@fluentui/global-context

Global Context for Fluent UI React

This package contains a shim for React.createContext API that will register the context object to the global scope (window for browsers, global for nodejs). This means that contexts will be real singletons.

⚠️ The recommended approach is not to use this package and deduplicate affected packages in node_modules

This package is is a workaround when multiple context objects are included into a bundle. This can happen when there are multiple copies of the same package installed in node_modules.

This package is not inteded to be used directly in code, but through a Babel transform