A basic Electron React app that uses react-to-print library to print individual components.
Implementation of print
method for print-to-react is the crux of the demo. See handlePrint
method in App.js. Also, See App.css for CSS print settings.
Download and extract the project. Run following command in root dir:
- Run
npm install
- Run
npm run dev
to start webpack-dev-server. Electron will launch automatically.
Note: Updated all dependencies to latest versions available on 1st Jan, 2022:
[email protected]
| Electron App demoing react-to-print library use
+-- @babel/[email protected]
|
+-- @babel/[email protected]
|
+-- @babel/[email protected]
|
+-- [email protected]
|
+-- [email protected]
|
+-- [email protected]
|
+-- [email protected]
|
+-- [email protected]
|
+-- [email protected]
|
+-- [email protected]
|
+-- [email protected]
|
+-- [email protected]
|
+-- [email protected]
|
+-- [email protected]
|
+-- [email protected]
|
+-- [email protected]
|
+-- [email protected]
|
+-- [email protected]
|
+-- [email protected]
|
`-- [email protected]