Usage
Copy
Ask AI
import { useIsExtension } from '@replit/extensions-react';
const Component = () => {
const isExtension = useIsExtension();
...
}
Signature
Copy
Ask AI
function useIsExtension(): boolean | undefined;
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.