Reference guide for React hooks that help you build Replit extensions. Includes hooks for file operations, theme management, and workspace integration.
Establishes the handshake between the Replit and the extension and passes the API wrapper for usage inside a React component.
Fires a callback with the replit API wrapper upon the first component render and when its dependency array changes.
Allows you to read and write to the contents of a file at the provided filePath.
Returns the file actively focused on by the current user.
Provides you with the global token color values of the current user’s theme.
Returns all metadata on the current theme including syntax highlighting, description, HSL, token values, and more.
Returns whether the handshake has been successfully established with the the Replit workspace. If the handshake is loading, undefined will be returned. After loading has finished, the hook will return a boolean.