Wrap a react component and make it and its children detachable from current browser frame into a popup
ReactDetachableWindow wraps a portion of the DOM or a group of react components and make it detachable from current window frame into a new window
it takes care to copy the stylesheets and title from the original frame into the new window or you can define your own
npm i react-detachable-window
import ReactDetachableWindow from 'react-detachable-window'
<ReactDetachableWindow title='I am detached!' windowOptions={{width: 800, height: 600}}>
<!-- DOM defined here can be detached to a new popup window and re-attached-->
</ReactDetachableWindow>
var reattachButton = (<button type='button'>Close!</button>)
var detachButton = (<button type='button'>Detach!</button>)
<ReactDetachableWindow
windowOptions={{ width: 800, height: 600 }}
reattachButton={reattachButton}i
detachButton={detachButton}>
...
</ReactDetachableWindow>
window.open(URL, name, specs, replace)
‘specs’ parameter