proton-native/docs/component_APIs/app.md
Niklas Mischkulnig c3a528945a Update for libui-node 0.1.0 (#57)
* Update for libui-node 0_1_0

- Use native eventloop
- position got removed

* Update libui-node version to 0.1.0

* babel rebuild

* Cleanup

* Fix non-check menu items

* Make quit menu work

* Add onShouldQuit to App and expose to user

* Remove bin
2018-03-22 09:48:12 -04:00

660 B

App

The app is the container for the entire program and holds Windows and Menus.

import React, { Component } from 'react';

import { render, Window, App } from 'proton-native';

class Example extends Component {
  render() {
    return (
      <App>
        <Window title="Example" size={{ w: 500, h: 500 }} />
      </App>
    );
  }
}

render(<Example />);

Props

Reference

onShouldQuit

Called when the quit menu item is called, right before the entire app quits.

Type Required Default
function() No () => {}