Skip to content

use named import than require() - #172

Open
BalajiJBcs wants to merge 1 commit into
reactide:masterfrom
BalajiJBcs:patch-1
Open

BalajiJBcs wants to merge 1 commit into
reactide:masterfrom
BalajiJBcs:patch-1

Conversation

@BalajiJBcs

Copy link
Copy Markdown

Electron module methods are been imported already, import the electron as named import rather than calling the require every time when a module is been already.

Electron module methods are been imported already, import the electron as named import rather than calling the require every time when a module is been already.
Comment thread main/main.js
'use strict';

const { app, BrowserWindow, Menu, Tray } = require('electron');
const electron, { app, BrowserWindow, Menu, Tray } = require('electron');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not:
const {nativeImage, app, BrowserWindow, Menu, Tray } = require('electron');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants