React with TypeScript
How to create an Electron app with React, TypeScript, and Electron Forge
Last updated
Was this helpful?
How to create an Electron app with React, TypeScript, and Electron Forge
Last updated
Was this helpful?
Adding React support to the TypeScript + Webpack template is fairly straightforward and doesn't require a complicated boilerplate to get started.
Create the app with the , then edit the newly created tsconfig.json
to add the key-value entry to the "compilerOptions"
section.
Add the basic React packages to your dependencies
and the corresponding types to your devDependencies
:
You should now be able to start writing and using React components in your Electron app. The following is a very minimal example of how to start to add React code:
For more about React, see .