본문 바로가기
Basic Development/Electron

2. Adding react package and practice

by 공기팡수 2023. 12. 31.

1. Install react package

npm install --save react react-dom

 

2. Make main.js file  (through visual code)

code src/js/main.js

 

2.1. And wirte code (below is the example code)

import React from 'react';
import ReactDom from 'react-dom';

ReactDom.render(<h1>Hello React App</h1>, document.getElementById('root'));

 

 

3. Finally, compare it with your root directory