UNPKG

adminjs

Version:
11 lines (10 loc) 542 B
import React, { ComponentType } from 'react'; /** * A higher-order component that prevents a component from rendering server-side * * @template P - The props object of the wrapped component * @param {React.ComponentType<P>} Component - The component to be wrapped * @returns {React.FC<P>} A new component that renders the given component client-side only */ declare const withNoSSR: <P extends Record<string, unknown>>(Component: React.ComponentType<P>) => (props: P) => JSX.Element | null; export { withNoSSR as default, withNoSSR, };