Hacker News new | past | comments | ask | show | jobs | submit login

> What often goes unnoticed is that declarative languages are not very future-proof [...] Surely that will not happen to React, you say, because it gets so many things right? Surely that will not happen to React, you say, because it gets so many things right?

It is often not appreciated how simple React really is. Its simplicity is actually well suited to survive a long, long time. Forget classes, lifecycles, schedulers and all this stuff for a moment. If you boil it down what you're left with is but a single signature: `createElement(name, props, chilren)`. That's what JSX transpiles into.

With that you can map pretty much every visual-oriented api on earth and as we can plainly see it goes further than that and starts rendering flat out everything that can be rendered in the same friendly manner we're used to:

shell consoles: https://github.com/Yomguithereal/react-blessed

word: https://github.com/nitin42/redocx

pdf: https://github.com/diegomura/react-pdf

samplers: https://twitter.com/GabeRicard/status/911989894267973633

mobile: https://facebook.github.io/react-native/

3d: https://github.com/Izzimach/react-three

windows: https://github.com/Microsoft/react-native-windows

macos: https://github.com/ptmt/react-native-macos

sketchapp: http://airbnb.io/react-sketchapp/

keynote: https://twitter.com/nishb1/status/913744410537537536

VR: https://facebook.github.io/react-vr/

hardware: https://github.com/iamdustan/react-hardware

What's even crazier is that everyday eco-system packages can be applied to the wildest targets. For instance animations via react-motion on shell consoles: https://github.com/gaearon/react-blessed-hot-motion or react-router on VR: https://youtu.be/Mf0Fy8iHp8k?t=12m25s

It's always the simple, almost trivial ideas that seem to survive and spread. React was released 4 years ago and has kept to a stable api. 16 was a rewrite, and it's a drop in replacement.




Forget classes, lifecycles, schedulers and all this stuff for a moment. If you boil it down what you're left with is but a single signature: `createElement(name, props, chilren)`.

When you pare it down to that, you're merely saying that GUIs are trees of configured objects. It's not a great revelation because the very first production GUI (Smalltalk 1972) already worked like that.

To get React from that idea, you need to add back all the stuff that you left out in the previous sentence. You add JavaScript, HTML-like syntax for defining trees and object attributes, component lifecycles and all that. And then it's not a generic idea anymore but a fairly specific implementation that will be superseded by something else eventually.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: