Pop New Windows In React

Category: Others , React | December 6, 2018
Author: rmariuzzo
Views Total: 26
Official Page: Go to website
Last Update: December 6, 2018
License: MIT

A component to pop new windows in React, using window.open api.

Features:

  • Only 2.68KB (gzipped!).
  • Support the full window.open api.
  • Built for React 16 (uses ReactDOM.createPortal).
  • Handler for blocked popups (via onBlock prop).
  • 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'

Preview:

Pop New Windows In React