I’m building up a new react app on electron , I want to access electron api from react Component to close the app with a button.
i tried to import electron but it give me module not found
import React, { Component } from 'react';
import './Frame.scss';
class Frame extends Component {
render() {
return(
<div className="kr-app-frame">
<div className="kr-app-frame-buttons-block">
<button id="close" className="kr-app-frame-button">X</button>
</div>
</div>
)
}
}
export default Frame;