You are helping the user add a React component to their Obsidian plugin.
Adds React components to Obsidian plugins with proper setup and integration.
/plugin marketplace add jwplatta/prompt-library/plugin install obsidian-plugin-builder@jwplatta-claude-toolsYou 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.