proton-native/docs
2018-03-01 21:03:36 -05:00
..
component_APIs Fix missing grid example. Fixes #10 2018-02-22 22:57:43 -05:00
images Add windows example 2018-02-11 17:01:02 -05:00
methods Update dialog.md (#31) 2018-02-25 22:24:31 -05:00
SVG Add windows example 2018-02-11 17:01:02 -05:00
.nojekyll Add initial documentation, add form, and prep for tab (pass full parent, not just element) 2018-02-05 19:43:25 -05:00
_coverpage.md Add KeyCDN 2018-02-22 23:16:16 -05:00
_sidebar.md Add Dialog docs. Docs are finished 2018-02-14 16:40:14 -05:00
CNAME Create CNAME 2018-02-09 17:08:01 -05:00
index.html Add into plain markdown 2018-02-22 23:18:41 -05:00
js_example.js Move to react naming conventions. Fixes #9 2018-02-22 22:54:39 -05:00
manual_install.md Separate manual install 2018-03-01 21:03:36 -05:00
packaging.md Fix packaging babel wording 2018-02-17 20:14:36 -05:00
python_example.py Add initial documentation, add form, and prep for tab (pass full parent, not just element) 2018-02-05 19:43:25 -05:00
quickstart.md Separate manual install 2018-03-01 21:03:36 -05:00
README.md Update height and width in README 2018-03-01 13:01:00 -05:00

Proton Native

Create native desktop applications through a React syntax, on all platforms

Why?

On mobile, it used to be hard to build beatiful cross-platform apps. Then React Native came along, giving us a seamless way to build user interfaces and manage state in code, all while doing it cross platform.

On desktop, there is no such tool. You can create a GUI using something like Qt, but the code to make it is messy and unorganized. Having made a very large GUI myself, it gets very cumbersome to manage all of that.

Some of you might be saying that you could do it in Electron. It's a good tool, but it brings in a lot of overhead, running a full webbrowser to manage a small GUI, while Proton Native can do the same, using native tools, with a smaller size and with less resource usage.

Proton Native does the same to desktop that React Native did to mobile. Build cross-platform apps for the desktop, all while never leaving the React eco-system. Popular React packages such as Redux still work.

Compare this code in Qt (Python):

import sys
from PyQt5.QtWidgets import (QWidget, QToolTip, 
    QPushButton, QApplication)
from PyQt5.QtGui import QFont    


class Example(QWidget):
    
    def __init__(self):
        super().__init__()
        
        self.initUI()

    def print_hello(self):
        print("Hello")
        
        
    def initUI(self):
        btn = QPushButton('Button', self)
        btn.clicked.connect(self.print_hello)
        btn.resize(btn.sizeHint())
        btn.move(50, 50)       
        
        self.setGeometry(300, 300, 300, 200)
        self.setWindowTitle('Example')    
        self.show()
        
        
if __name__ == '__main__':
    
    app = QApplication(sys.argv)
    ex = Example()
    sys.exit(app.exec_())

To this code using Proton Native:

import React, { Component } from 'react';

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

class Example extends Component {
  render() {
    return (
      <App>
        <Window title="Example" size={{w: 300, h: 300}} menuBar={false}>
          <Button stretchy={false} onClick={() => console.log('Hello')}>
            Button
          </Button>
        </Window>
      </App>
    );
  }
}

render(<Example />);

It is not only shorter, it is also easier to read and to edit, and can easily utilize the power of the state.

Features

  • Same syntax as React Native
  • Works with existing React libraries such as Redux
  • Cross platform
  • Native components. No more Electron
  • Compatible with all normal Node.js packages

Examples

Check out the examples to see more.

Accelerated by KeyCDN