The @eidos.space/react package provides a set of React hooks and utilities for building Eidos extensions. It allows extensions to interact with Eidos data, UI, and system services in a type-safe manner across different rendering environments.
React hook to access the Eidos SDK.
import { useEidos } from " @eidos.space/react "
// Example: Query table (tableId is a UUIDv7 without dashes)
const Users = eidos . space . table ( " 01935b4c9d2e7f8a0b1c2d3e4f5a6b7c " )
const users = await Users . findMany ()
eidos . space . fs . readFile ( " /path/to/file " , " utf8 " )
Property Type Description currentSpaceDataSpaceCurrent space data access spaceDataSpaceAlias for currentSpace AIobjectAI capabilities (text/object generation)
React hook to retrieve typed extension context.
} from " @eidos.space/react "
const ctx = useExtensionContext < FileHandlerContext > ()
console . log ( ctx . filePath )
Property Type Description type"extNode"Discriminator spacestringCurrent space name nodeIdstringUnique node ID
Property Type Description type"tableView"Discriminator spacestringCurrent space name tableIdstringTarget table ID viewIdstringTarget view ID
Property Type Description type"fileHandler"Discriminator spacestringCurrent space name filePathstringAbsolute file path
} from " @eidos.space/react "
const ctx = useExtensionContext ()
if ( isExtNodeContext (ctx)) {
// ctx.nodeId is available