Slide 30
Slide 30 text
Java JS
Bridge
require(‘AppRegistry’).runApplication(‘MyApp’,
{});
UIManager.createView(2,
’View’,
{…});
UIManager.createView(3,
’Text’,
{…});
…
UIManagerModule#createView(2,
‘View’,
…)
View
newView
=
new
View();
UIManagerModule#createView(3,
‘Text’,
…)
TextView
newView
=
new
TextView();
…
[[2, 3, [2, ‘View’, {…}]],
[2, 3, [3, ‘Text’, {…}]]]
JS calls that function which in turn leads
to a bunch of calls from JS to native.
For example, create a TextView, send a
network request. These are all batched
together and sent back to native
asynchronously.