react-resize-detector

  • Version 7.0.0
  • Published
  • 319 kB
  • 2 dependencies
  • MIT license

Install

npm i react-resize-detector
yarn add react-resize-detector
pnpm add react-resize-detector

Overview

React resize detector

Index

Functions

function useResizeDetector

useResizeDetector: <T = any>(
props?: FunctionProps
) => UseResizeDetectorReturn<T>;

    function withResizeDetector

    withResizeDetector: <P, ElementT extends HTMLElement = HTMLElement>(
    ComponentInner: ComponentType<P>,
    options?: ComponentsProps<ElementT>
    ) => React.ForwardRefExoticComponent<any>;

      Classes

      class ResizeDetector

      class ResizeDetector<
      ElementT extends HTMLElement = HTMLElement
      > extends PureComponent<ComponentsProps<ElementT>, ReactResizeDetectorDimensions> {}

        constructor

        constructor(props: ComponentsProps<ElementT>);

          property attachObserver

          attachObserver: () => void;

            property cancelHandler

            cancelHandler: () => void;

              property createResizeHandler

              createResizeHandler: ResizeObserverCallback;

                property getElement

                getElement: () => Element | Text | null;

                  property getRenderType

                  getRenderType: () => string;

                    property observableElement

                    observableElement: any;

                      property resizeHandler

                      resizeHandler: any;

                        property resizeObserver

                        resizeObserver: any;

                          property skipOnMount

                          skipOnMount: boolean;

                            property targetRef

                            targetRef: any;

                              method componentDidMount

                              componentDidMount: () => void;

                                method componentDidUpdate

                                componentDidUpdate: () => void;

                                  method componentWillUnmount

                                  componentWillUnmount: () => void;

                                    method render

                                    render: () => any;

                                      Interfaces

                                      interface UseResizeDetectorReturn

                                      interface UseResizeDetectorReturn<T> extends ReactResizeDetectorDimensions {}

                                        property ref

                                        ref: MutableRefObject<T | null>;

                                          Package Files (4)

                                          Dependencies (2)

                                          Dev Dependencies (23)

                                          Peer Dependencies (2)

                                          Badge

                                          To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                          You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/react-resize-detector.

                                          • Markdown
                                            [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/react-resize-detector)
                                          • HTML
                                            <a href="https://www.jsdocs.io/package/react-resize-detector"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>