1

I'm working on a javascript React-based application running under nwjs.

My task is: on a button click, display scrollable instructions in a dialog that users can drag to a second monitor, so they can do their work in the main window, following the instructions in my new dialog.

I only know how to make modal dialogs with React. How do I make a non-modal dialog, so the user can scroll through the instructions as needed while they work in the main window?

David Burson
  • 2,947
  • 7
  • 32
  • 55

1 Answers1

2

Window you create trought react, must stay in browser window.

Call new child window so you get new window that can be dragged across desktop.

Window.open(url, [options], [callback])

See documentation

azurinko
  • 261
  • 2
  • 11
  • Thanks - do you know where to find a small sample app that demonstrates showing a react component in the new window? – David Burson Jun 21 '17 at 18:36
  • 1
    No, but you can load any URL into new vidow, with new react instances, you can propagate events maybe trought local storage or trought ipcRenderer -> ipcMain -> ipcRenderer(another) ... maybe events in local storage are acessible from each window of electron browser, otherwise there is no simple way to propage events across different browser windows. – azurinko Jun 27 '17 at 14:01