UNPKG

fluidstate-react

Version:

Library for using fine-grained reactivity state management library fluidstate in React

12 lines (11 loc) 605 B
import { FunctionComponent } from "react"; /** * A Higher-Order Component (HOC) that makes a React component reactive. * The wrapped component will automatically re-render whenever any `fluidstate` * reactive properties accessed during its render cycle change. * * @template P The props type of the component to wrap. * @param {FunctionComponent<P>} Component The React functional component to make reactive. * @returns {FunctionComponent<P>} A new reactive component that wraps the original one. */ export declare const withReactive: <P>(Component: FunctionComponent<P>) => FunctionComponent<P>;