javascriptreactjsnwjsnon-modal

How to create a non-modal React dialog?


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?


Solution

  • 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