Description:
A component to pop new windows in React, using window.open api.
Features:
- Only 2.68KB (gzipped!).
- Support the full
window.openapi. - Built for React 16 (uses
ReactDOM.createPortal). - Handler for blocked popups (via
onBlockprop). - Center popups according to the parent window or screen.
Installation:
# Yarn $ yarn add react-new-window # NPM $ npm install react-new-window --save
import React from 'react' import NewWindow from 'react-new-window'
