You are helping the user add a React component to their Obsidian plugin.
From obsidian-plugin-buildernpx claudepluginhub jwplatta/agent-cubicle --plugin obsidian-plugin-builder/add-react-componentYou are helping the user add a React component to their Obsidian plugin.
You are helping the user add a React component to their Obsidian plugin.
Verify React is set up:
Ask the user about the component:
Create the React component:
Integrate with Obsidian:
Example pattern:
import { ItemView } from 'obsidian';
import * as React from 'react';
import { createRoot, Root } from 'react-dom/client';
export class MyReactView extends ItemView {
root: Root | null = null;
onOpen() {
const container = this.containerEl.children[1];
container.empty();
this.root = createRoot(container);
this.root.render(<MyComponent />);
}
onClose() {
this.root?.unmount();
}
}
Reference example plugins for React integration patterns.