Socket
Socket
Sign inDemoInstall

@fluentui/react-window-provider

Package Overview
Dependencies
Maintainers
12
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fluentui/react-window-provider

Utilities for providing and consuming the window/document objects even across portal/iframe/child-window boundaries.


Version published
Weekly downloads
142K
decreased by-20.77%
Maintainers
12
Weekly downloads
 
Created

What is @fluentui/react-window-provider?

@fluentui/react-window-provider is a package that provides a React context for managing window-related properties and events. It is part of the Fluent UI library and is used to ensure that components can access and respond to window properties and events in a consistent manner.

What are @fluentui/react-window-provider's main functionalities?

WindowProvider

The WindowProvider component is used to wrap your application or a part of it to provide window-related context to its children. This ensures that all components within the provider can access and respond to window properties and events.

import { WindowProvider } from '@fluentui/react-window-provider';

const App = () => (
  <WindowProvider>
    <YourComponent />
  </WindowProvider>
);

useWindow

The useWindow hook allows you to access the window object within your functional components. This can be useful for responding to window size changes or other window-related events.

import { useWindow } from '@fluentui/react-window-provider';

const YourComponent = () => {
  const window = useWindow();

  return (
    <div>
      Window width: {window.innerWidth}
    </div>
  );
};

Other packages similar to @fluentui/react-window-provider

FAQs

Package last updated on 01 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc