Hacker News new | ask | show | jobs
by arijo 596 days ago
Guys, help me understand these changes:

Can I comprehend this as a new Virtual Native UI immutable tree running in native space?

And react native mounts and updates basically synchronally updating this immutable tree and reconciliation being done in native space, dynamically updating the app layout?

1 comments

Kind of. We already had a native UI tree running in native (the same way the browser has it's own internal representation of the DOM). The difference in this release is that we rewrote it in C++ and made it immutable. That means instead of having a different UI tree in each platform (one for iOS, one for Android, etc), we have one C++ tree that all platforms use. And since it's immutable, it's thread safe and we can read layout and commit it from different threads if needed.

Reconciliation is still done in React on the JS thread, similar to React DOM.

Thanks for the clarification. Dumb question:

How does the renderer ensure consistency in case o multiple immutable tree references?

Wondering the same (replying to easier find your comment and hopefully the answer since i cant favorite comments)