
Ask HN: Should I be nervous about using React? - fergyfresh
I have been using React to build frontends for about 6 months now and I love it. Should I learn Angular2 instead and ditch React because of its sketchy licensing?
======
acemarke
No. I'd encourage you to read Facebook's FAQ on React's license at
[https://code.facebook.com/pages/850928938376556](https://code.facebook.com/pages/850928938376556)
, as well as other discussions on the license (links at
[https://github.com/markerikson/react-redux-
links/blob/master...](https://github.com/markerikson/react-redux-
links/blob/master/pros-cons-discussion.md#reacts-patents-license) ).

------
rpeden
It depends. Does React's license cause problems for you personally, or for
your employer or clients? If so, that would be a good reason to avoid using
it.

I'd suggest giving Angular 2 a try regardless. It's pretty well thought out,
and you might find that a lot of things you need a separate library for are
included with A2. It isn't excessively opinionated, though. You can easily
plug in tools you use with React (such as Redux) and they work nicely with
Angular 2.

~~~
fergyfresh
I guess the license doesn't cause much pain currently and if I have to sue and
lost the license I could always have A2 in my back pocket.

~~~
rpeden
If you're only using React with ES6/ES2015, you could also try Preact. I've
found it to be a pretty decent drop-in replacement for React. There's also a
preact-compat package that supports some additional React features.

~~~
fergyfresh
You bring up a good point. The biggest point of using React for me was using
React-Native which Preact doesn't seem to have. I could definitely use Preact
for most of my projects as I really only use React for its ability to make
front-end components with ES6, so I will have to look in more detail. Thanks
for the reference.

~~~
rpeden
You're welcome. You're correct that there's no React Native equivalent for
Preact.

That might be a point in favor of Angular 2 where you need code that can be
shared between mobile and web apps. Nativescript is similar to React Native,
and has built in support for Angular 2.

~~~
fergyfresh
I'm not one of a bandwagon jumper, but I have been hearing similarly nice
things about Angular 2 being equally as un-opinionated as React in many ways.
I just hate losing the momentum that I currently have with React/Rails apps.

~~~
rpeden
One of the nice things is that you don't necessarily have to lose all your
momentum.

There's a bit of a learning curve, but you'd find that A2 components are
similar to React components, and have similar lifecycle methods. So although
some of the specifics about how you do things are different, you can use the
same patterns and practices you've been using with React.

That's not to say that you _should_ move to Angular 2. Just that many of the
good habits and practices you've developed while using React are portable.

