Generating a new React application

When creating a new Electron project, the most important part is to decide on the stack and tooling to use. For this project, we are going to use the React view library, as well as the popular create-react-app tool, which allows you to generate a full-fledged application structure in a matter of seconds.

Let's generate a new application called ebook-generator:

  1. Run the following code to generate a new React application:
npx create-react-app ebook-generator

The output should be similar to the following:

Compiled successfully!

You can now view ebook-generator in the browser.

Local: http://localhost:3000/
On Your Network: http://192.168.0.10:3000/

Note that the development build is not optimized.
To create a production build, use yarn build.
  1. Switch to the project folder and run the project using the following command:
cd ebook-generator
npm start
  1. If you navigate to http://localhost:3000, you should see the following as a result:

Now, let's install the Monaco Editor component and integrate it with our React application for Electron.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.114.94