React with TypeScript
How to create an Electron app with React, TypeScript, and Electron Forge
Create the app and setup the TypeScript config
Add the React dependencies
npm install --save react react-dom
npm install --save-dev @types/react @types/react-domIntegrate React code
import React from 'react';
import { createRoot } from 'react-dom/client';
const root = createRoot(document.body);
root.render(<h2>Hello from React!</h2>);// Add this to the end of the existing file
import './app';Last updated
Was this helpful?