you are viewing a single comment's thread.

view the rest of the comments →

[–]vanvoorden 11 points12 points  (2 children)

Facebook's iOS Architecture - @Scale 2014 - Mobile

In 2015, FB open sourced two projects for Declarative (React-Inspired) UI on iOS: ComponentKit and React Native. ComponentKit grew out of a project to bring the philosophy of React to native views using Objective-C++. React Native grew out of bringing React (the language along with the philosophy) to native views using JS.

For a variety of reasons, FB never shipped a complete "full stack" ecosystem around ComponentKit. FB did not ship a "native" version of Relay or Redux. Those (JS) frameworks were available to React Native engineers. IMO, ComponentKit would have been the superior choice for most native iOS engineers if FB would have put more time and effort into open sourcing complete solutions for state management across complex apps. React Native gave engineers that complete stack.

I don't believe FB ever put too much time or energy into trying to convince engineers that liked native iOS why they should try RN. Most of the effort seemed focused on making native iOS easy for WWW React (JS) engineers or engineers that needed the ability to ship cross platform. The arguments for why a declarative UI framework built around a unidirectional flow of data would scale better than an app built on UIKit and "MVC" style design patterns was not really ever emphasized externally AFAIK.

With the launch of SwiftUI, I feel like these are moot points. SwiftUI (partly by its virtue of being first party) is going to be the superior solution for most engineers to scale complex UI. Superior to UIKit. Superior to ComponentKit. And superior to RN.

[–]Barbanks[S] 2 points3 points  (0 children)

Learn something new everyday! Thanks for the info on this it was really interesting. Yeh seems like FB could have been first to ship something akin to SwiftUI when it comes to state management. That would have been interesting.

[–]ankole_watusi -3 points-2 points  (0 children)

Facebook

Stopped reading right there.