useReplit
The useReplit() hook establishes the handshake between the Replit and the extension and passes the API wrapper for usage inside a React component.
useReplitEffect
The useReplitEffect() hook fires a callback with the replit API wrapper upon the first component render and when its dependency array changes. It is similar in functionality to the useEffect React hook.
useWatchTextFile
The useWatchTextFile() hook allows you to read and write to the contents of a file at the provided filePath.
useActiveFile
The useActiveFile() hook returns the file actively focused on by the current user.
useThemeValues
The useThemeValues() hook provides you with the global token color values of the current user's theme.
useTheme
The useTheme() hook returns all metadata on the current theme including syntax highlighting, description, HSL, token values, and more.
useIsExtension
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.