Build Your Own
React Native with Python and Gtk!

About me

Alexey Zaslavsky

Front-end Technical Lead at

React Fiber

Official renderers from Facebook:

  1. React DOM
  2. React Native
  3. React 360

React Blessed

React Blessed

Idea of a renderer:

Common lifecycle of UIs:

Phase DOM Native UI
Initial render createElement,
appendChild,
addEventListener
connect,
create widgets,
add listeners
Work loop set "element.textContent" update widgets props
Unmount removeChild,
removeEventListener
disconnect,
remove widgets,
remove listeners

What can be rendered with React?

What do we need from the native UI?

What do we need from the native UI?

Native UI frameworks

WPF XML for Applications (XAML)

Solution – Gtk+

Houston, we have a problem!

Houston, we have a problem №2!

Demo 1:

Python, Gtk
Imperative API
* No React Yet

General architecture

Communication channel requirements

How can we communicate?

What do we send?

Keeping track of elements

Remote Procedure Calls: to UI

Remote Procedure Calls: to UI

Remote Procedure Calls: to UI

Remote Procedure Calls: to UI

Remote Procedure Calls: from UI

Demo 2:

Python, Gtk
Imperative API via RPC
No React Renderer

Architecture diagram

Demo 3:

React Renderer

References

Thanks!