Basic Electron app to test click / touch behaviour and event ordering.
For ideal "click" / single touches, the event order should be as follows.
- pointer-down
- touch-start
- pointer-up
- pointer-leave
- touch-end
- click
For click and drags across the button, you'd expect to see something like:
- pointer-down
- touch-start
- touch-move
- pointer-cancel
- touch-move
- ...
- touch-end
Note that pointer-up, pointer-leave and click do not fire
This project was bootstrapped with Create React App using cra-template-typescript-electron template.
In the project directory, you can run:
Runs the app in the development mode.
Electron will start automaticly when dev server is ready and http://localhost:3000 can be visited.
The page will reload if you make edits.
You will also see any lint errors in the console.
Electron will restart automaticly when you modified files in src-main
directory.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
DO NOT run this command directly, it is not enough to distribute a application only by building the renderer.
Distribute application to the dist
folder. *
can be replace by win
, mac
or linux
. It will build the renderer and main scripts, and then use electron-builder to package them into distributable.
When you encountered the error called 'Electron failed to install correctly', you will need this command to reinstall Electron module.
You can learn more in the Create React App documentation.
To learn React, check out the React documentation.