
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
react-electron-browser-window
Advanced tools
Electron's BrowserWindow as a react component
A react component that gives access to the encapsulating window, similarly to how react native's Statusbar component works.
By controlling the window through a react component, you give your react app canonic access to electron's BrowserWindow object. A good usecase is a multiscreen application - you can embed a <BrowserWindow /> component in each of your route components, making each one of them adjust the window to its needs without having to programatically do so throguh electron's remote.
Using NPM:
$ npm install --save react-electron-browser-window
Using yarn:
$ yarn add react-electron-browser-window
The <BrowserWindow /> component contains the following props:
title: String - title of the window (if not frameless)visible: Boolean - whether to show or hide the windowicon: Boolean - sets the window's iconwidth, height: (Number, Number) - window's dimensions, will apply only if both are givenleft, top: (Number, Number) - window's position, will apply only if both are givencenter: Boolean - moves the window to the center, overrides positionanimated: Boolean - if true, will animate window between dimensions and positions.movable: Boolean - if true, window will be movableresizable: Boolean - if true, window will be resizableminimizable: Boolean - if true, window will be minisizablemaximizable: Boolean - if true, window will be maximizablefullscreenable: Boolean - if true, window will be fullscreenableclosable: Boolean - if true, window will be closablealwaysOnTop: Boolean - whether window always shows on topskipTaskbar: Boolean - if true, window will not show on taskbarwindowState: String - either one of the following options:
normal: default window stateminimized: window will be minimizedmaximized: window will be maximizedfullscreen: window will be fullscreenkiosk: window will show in kiosk modemacOsVibrancy: String - displays the window with vibrancy effect on macOS:
light, dark, titlebar, selection, menu, popover, sidebar, medium-light, ultra-dark, appearance-basedDefault value policy:
The component only takes its parameters explicitly, that is, if it was not passed, it will not be touched. That is useful in cases where you want to control certain aspects of your window from other places in your code. If you only pass certain parameters through the BrowserWindow component, you can be rest assured that it will apply nothing but them.
import React, {Component} from 'react';
import BrowserWindow from 'react-electron-browser-window';
class App extends Component {
render() {
return (
<BrowserWindow title="Hello, World!" visible={true} center={true} />
)
}
}
Code is provided under MIT license.
FAQs
Electron's BrowserWindow as a react component
The npm package react-electron-browser-window receives a total of 4 weekly downloads. As such, react-electron-browser-window popularity was classified as not popular.
We found that react-electron-browser-window demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.