This is a demo application showcasing the HaexHub SDK integration with React and TypeScript.
- Database operations (CREATE TABLE, INSERT, SELECT)
- Table name prefixing using
getTableName() - High-level SDK API (
client.query(),client.execute()) - React hooks for reactive state management
- TypeScript with functional components
Install dependencies:
npm installThis is the proper way to test the extension with full HaexHub integration:
-
Start the dev server:
npm run ext:dev
-
Open HaexHub and load the dev extension:
- Click on "Extensions" or "Add Extension"
- Select "Load Dev Extension"
- Choose this project directory
The extension will now run inside HaexHub with full access to the SDK APIs.
For UI development without HaexHub:
npm startNote: Database operations will not work in standalone mode as they require HaexHub's runtime environment.
Build and sign the extension for production:
npm run ext:buildThis creates a signed .haextension file that can be installed in HaexHub.
haex-demo-react/
├── src/
│ ├── App.tsx # Main demo component
│ ├── App.css # Styles
│ └── index.tsx # Entry point
├── haextension/
│ ├── manifest.json # Extension metadata
│ ├── public.key # Public signing key
│ ├── private.key # Private signing key (not in git)
│ └── icon.svg # Extension icon
├── haextension.config.json # Extension dev configuration
└── package.json