Facebook has open-sourced ComponentKit, its React-inspired framework for iOS.
Facebook says ComponentKit is a native Objective-C++ view framework with a declarative, functional approach to building a UI. "We use this inside of our own Facebook [iOS] app to power News Feed and the other products within the app," said James Pearce, head of the open source program at Facebook. "We've rolled this out over the last year or so, and we've obviously seen a big improvement in both the performance, the startup times, and the amount of code we have to write; the complexity's really dropped."
ComponentKit is inspired by React, in the sense that developers declare how they want to use the interface instead of trying to imperatively put it together piece by piece, Pearce explained. ComponentKit can be found on GitHub.
ComponentKit emphasizes a one-way data flow from immutable models to immutable components. These components describe how views should be configured and let developers focus on what the interface itself should look like, rather than focusing on steps to build the interface.
By making ComponentKit available to anyone, Pearce said Facebook hopes developers will get the same benefits that Facebook has, such as simplicity of code.
This story, "Facebook's iOS UI dev framework goes open source" was originally published by InfoWorld.