Check out example codes for "electron draggable". It will help you in understanding the concepts better.

Code Example 1

<body style="-webkit-app-region: drag">
</body>

Code Example 2

button {
  -webkit-app-region: no-drag;
}

Learn ReactJs, React Native from akashmittal.com