Live data from Hacker News

ComponentKit by Facebook: A React-Inspired View Framework for iOS

componentkit.org

41–50 of 56 posts

Re: ComponentKit by Facebook: A React-Inspired View Framework for iOS

#42

This is a great idea, but the fact that it's implemented in Objective-C++ is a deal-breaker for me since I'm starting to use Swift in my iOS projects. From the docs: "ComponentKit is built on Objective-C++. There is no easy way to interoperate with Swift since Swift cannot bridge to C++."

tambourine_man mentioned this above, but at the end of the video they said that the next version would be in swift.

Re: ComponentKit by Facebook: A React-Inspired View Framework for iOS

#43
post #37
post #21

This technology looks great. It is too bad Facebook doesn't have their own platform like iOS or Android. It's becoming pretty clear that they have a much better handle on UI technology than Apple, Google, Microsoft, or anyone really. Them creating a logical functional UI API on top of messy imperative APIs is very helpful, but even better would be if that was not necessary.

It might very well be that only having two user-facing products is what allows them to concentrate on their UI to this degree.

Quite the opposite.

Wanting to be able to continue building new products quickly and at scale is the reason we invest in infrastructure like this so heavily.

Re: ComponentKit by Facebook: A React-Inspired View Framework for iOS

#44
post #32
post #19

Earlier quoted context omitted.

:) I think our current story is "by June 10". https://twitter.com/Vjeux/status/578311560583520256

Any way to get early access for a huge React fan?

Early access? It's already public! https://github.com/facebook/componentkit

Re: ComponentKit by Facebook: A React-Inspired View Framework for iOS

#45
post #21

This technology looks great. It is too bad Facebook doesn't have their own platform like iOS or Android. It's becoming pretty clear that they have a much better handle on UI technology than Apple, Google, Microsoft, or anyone really. Them creating a logical functional UI API on top of messy imperative APIs is very helpful, but even better would be if that was not necessary.

>It is too bad Facebook doesn't have their own platform like iOS or Android

They tried to make a move on Android with Facebook Home but it crashed and burned.

Re: ComponentKit by Facebook: A React-Inspired View Framework for iOS

#46
post #5

> (Don't confuse ComponentKit with React Native, a framework for building apps in Javascript.) As long as they can't describe it without citing React, this is going to confuse people. At the very least, the logline should mention Obj-C/Swift/Cocoa to differentiate the projects.

Indeed! I am for one quite confused. So this is native to Obj-C, right? Unlike React Native, which is not native, I guess? Can it in any way be made to interact with React Native or are they two completely different technologies (i.e., does React Native render to ComponentKit)? Why do Facebook need both? When do they use the one over the other? Why?

Re: ComponentKit by Facebook: A React-Inspired View Framework for iOS

#47
post #38

Earlier quoted context omitted.

> a logical functional UI API on top of messy imperative APIs But without the "messy" imperative API, the functional UI cannot be built. This applies to all functional UI frameworks. It's funny that one of React's core ideas is to ditch the now old functional/declarative paradigm that is template languages and allows you to use imperative JavaScript to directly build up a virtual DOM.

I don't think that's true. Under the mutable UI trees, 60 times a second the entire UI is rendered from scratch in the OpenGL (or similar) layer. It seems to me it would be possible to completely skip that part by making a new React-like OpenGL renderer.

I agree with that idea. In my view I think Skia method calls are like assembly and virtual DOM is like a high level programming language. So I decided to try one https://github.com/Quamolit/ my original idea was to write in React way but generates operations that can be finished with Canvas API.

I found it quite hard to finish such a project though. Browser vendor are more likely doing the job of abstracting out hardware and OS powers so people can utilize. There's still much more effect to be done to create an FRP-like(functional reactive programming) system that everybody is happy with.

Re: ComponentKit by Facebook: A React-Inspired View Framework for iOS

#49
post #5

> (Don't confuse ComponentKit with React Native, a framework for building apps in Javascript.) As long as they can't describe it without citing React, this is going to confuse people. At the very least, the logline should mention Obj-C/Swift/Cocoa to differentiate the projects.

Indeed! I am for one quite confused. So this is native to Obj-C, right? Unlike React Native, which is not native, I guess? Can it in any way be made to interact with React Native or are they two completely different technologies (i.e., does React Native render to ComponentKit)? Why do Facebook need both? When do they use the one over the other? Why?

Ben commented on another thread yesterday. ComponentKit is similar because it follows Facebook's philosophy for UI, but came about before React Native was attempted. (Hence, it's written in Apple's native Obj-C as opposed to React's JS.)

React Native came after some successful experiments later and isn't as mature.

Re: ComponentKit by Facebook: A React-Inspired View Framework for iOS

#50
post #33

This looks really cool. However, there were a couple odd things about the talk. If you're going to spend so much time talking about managing mutation of data in a multithreaded environment, you should at least mention GCD and explain why it doesn't figure in the list of possible solutions to the problem. But the talk proceeded as if GCD did not exist, listing a few straw man bad solutions, but not the obvious go-to s…

Actually ComponentKit is built on GCD!

https://github.com/facebook/componentkit/blob/master/Compone...

GCD is fantastic—one of my absolute favorites. We're trying to solve a problem one level above that: exposing an API that doesn't require every view developer to know the details of managing GCD queues and updating a UICollectionView.

As for Autolayout, it's very powerful but isn't performant enough for layouts as complex as Facebook's News Feed. We tried it first before developing ComponentKit.

Post reply on HN