#require issue

4 messages · Page 1 of 1 (latest)

glacial axle
#

hi im knew to Electron js
im facing ann issuee with require
<html lang="en">
<head>
</head>
<body>
<form>
<div>
<label> Enter your todo</label>
<input type="text" autofocus>
<button type="submit"> Add</button>
</div>
</form>
<script>
const electron = require('electron')
const {ipcRender} = electron
document.querySelector('form').addEventListener('submit',(event)=>{
event.preventDefault();
const val = document.querySelector('input').value;
ipcRender.send('add-todo',val)
})
</script>
</body>
</html>
cann someone explain thanks

sullen sierra
#

You can check this (ignore the mention of React since you don't use it)

glacial axle
#

yeah its still the same issue

sullen sierra
#

Read the docs and you should be able to solve this.