Skip to main content

useIsExtension() Hook

The useIsExtension() hook returns whether the handshake has been successfully established with the Replit workspace. If the handshake is loading, undefined will be returned. After loading has finished, the hook will return a boolean.

Usage

import { useIsExtension } from '@replit/extensions-react';

const Component = () => {
const isExtension = useIsExtension();

...
}

Signature

function useIsExtension(): boolean | undefined;
Was this helpful?