• Eduardo Sanz García's avatar
    Convert Notebook into a react component · 265fed83
    Eduardo Sanz García authored
    Notebook class creates the container element and instantiates the preact
    component NotebookModal.
    
    NotebookModal listens to the openNotebook event sent through the
    eventBus and hides and shows the modal accordingly.
    
    The creation of the iframe is a costly operation: it involves several
    backend calls and the rendering of it in the DOM. Therefore, we delay
    the creation of the iframe element until the NotebookModal listens for
    the `openNotebook` event.
    
    The useEffect's cleanup of the NotebookModal componente has significant
    effects because it resets the overflow CSS property of document.body.
    
    As pointed by @robertknight, `render(null, container)` destroys the
    component triggering the useEffect's cleanup function.
    265fed83
Name
Last commit
Last update
..
test Loading commit data...
AdderToolbar.js Loading commit data...
Buckets.js Loading commit data...
NotebookModal.js Loading commit data...
Toolbar.js Loading commit data...
WarningBanner.js Loading commit data...