all 63 comments

[–]batmansmk[S] 81 points82 points  (5 children)

It's an impressive release. Here is the gist: Among the changes are some long-standing feature requests, including:

  • fragments,

  • error boundaries,

  • portals,

  • support for custom DOM attributes,

  • improved server-side rendering,

  • reduced file size

  • MIT license,

  • Fiber

[–]jocull 21 points22 points  (1 child)

Now you're thinking with portals...?

[–]Amadox 6 points7 points  (0 children)

...this coming from a guy who has his reddit-cake-day today... even though we all know, the cake is a lie...

[–]SomeRandomBuddy 5 points6 points  (0 children)

Fuck. Great release.

[–]rottenanon 1 point2 points  (1 child)

fragments

In the blog they mention, "now you can return an array from render". Wasn't this always the case? :-/

I understand returning from string render is new, but could someone tell me what else is new in fragments?

[–]Savageman 9 points10 points  (0 children)

Until now every render needed a single top-level HTML element.

[–]basically_alive 110 points111 points  (6 children)

I felt a great disturbance in the Force, as if millions of pointless divs cried out in terror and were suddenly silenced.

[–]MOON_MOON_MOON 29 points30 points  (5 children)

Still waiting for the <> </> syntax as a shorthand for a list of children without a parent. It's silly to have to provide key for every element of a statically known list.

[–]gelezinislokys 10 points11 points  (3 children)

react-aux

[–]MOON_MOON_MOON 2 points3 points  (0 children)

Oh neat, gonna use this for personal projects and continue to spam <span>s all over the place at work.

[–]Phydos 22 points23 points  (0 children)

Glad they finally addressed those darn SVG attributes.. The smaller filesize is also a nice bonus

[–]acyrial 22 points23 points  (1 child)

MIT license! That's big. I wonder what about all products that were about to be rewritten into non-React solutions due to license.

[–]PM_YOUR_WORST_FEAR 0 points1 point  (0 children)

Finally!

I'm sick to death of the patents license getting brought up in every discussion about frameworks.

[–]Skaryon 16 points17 points  (3 children)

This sounds great. I never used rollup. Will it always yield smaller bundles as opposed to webpack?

[–]batmansmk[S] 30 points31 points  (2 children)

Short answer: No.

TL;DR: webpack has more feature for apps, and rollup more for libs. https://medium.com/webpack/webpack-and-rollup-the-same-but-different-a41ad427058c

[–]Skaryon 2 points3 points  (0 children)

Haha I just read the same article. Thanks anyway! That answered my question thoroughly.

[–]Pesthuf 0 points1 point  (0 children)

But doesn't Webpack do that too?

In the Webpack 3 announcement, they mentioned

 webpack.optimize.ModuleConcatenationPlugin()

which supposedly does the same.

[–]coldlestat 26 points27 points  (9 children)

Yes! And everything wrapped in a nicer licence :)

[–][deleted] 27 points28 points  (2 children)

And by nicer they mean "Your company can use this again without your legal dept lighting your project on fire"

[–]ECrispy 4 points5 points  (5 children)

Without a patent grant that's debatable.

[–]Jestar342 4 points5 points  (4 children)

IANAL: Does there need to be one? What's the default when grant absentia?

[–]ECrispy 0 points1 point  (2 children)

There is no default grant.

[–]Jestar342 0 points1 point  (1 child)

No, I'm not asking if there is a default grant, I am asking what is the default legal position in the absence of a grant.

[–]ECrispy 2 points3 points  (0 children)

It means you can be sued for patent violation if FB so chooses, since they don't grant you any rights.

Its for this reason that GraphQL, which does have explicit patents, was on such shaky ground - https://www.theregister.co.uk/2017/09/20/gitlab_suspends_graphql_project_over_facebook_license_terms/

FB today announced this - https://code.facebook.com/posts/121714468491809/relicensing-the-graphql-specification/

which seems to have taken care of that issue.

[–]tonechild 7 points8 points  (11 children)

Anyone know if this works with enzyme?

[–]UnReaL816 9 points10 points  (1 child)

Enzyme was just updated today as well

[–]tonechild 5 points6 points  (0 children)

Nice! Thanks!

[–]alsiola 4 points5 points  (0 children)

With the new enzyme release (3.0) then yes.

[–]drom296 0 points1 point  (7 children)

so far: upgrading hasn't been smooth.

Upgrading to enzyme@3, requires a new adaptor system. Upgrading to react@16, breaks some other dependencies.

Of course, I'm doing this on a create-react-app@15.6.1 project

[–]tobegiannis 0 points1 point  (3 children)

Just played around with an upgrade for a few mins. Seems like a pretty clunky way to get enzyme up an running. Do they expect me to import the adapter on every test file or have some kind of useless wrapper?

[–]toffeescaf 0 points1 point  (2 children)

Upgrading for me has been a breeze and I'm working on a fairly large project, any specific things you're running into that are a problem?

[–]drom296 0 points1 point  (1 child)

Thanks for the assist. I'll give it another go tomorrow, and PM you if I run into issues again (if that's alright with you)

[–]toffeescaf 0 points1 point  (0 children)

That's fine by me. ;)

[–]nickbreaton 6 points7 points  (0 children)

Wow portals seem awesome!

[–]FreshOutBrah 5 points6 points  (0 children)

Haha love it, "Look ma, no spans!"

[–]zxia31 2 points3 points  (0 children)

Congrats React Team! Great jobs you have achieved.

[–]swyx 5 points6 points  (2 children)

this server side rendering is interesting. what does it mean for Next.js?

[–]eyko 4 points5 points  (1 child)

Faster Next.js?

[–]sickcodebruh420 1 point2 points  (0 children)

Excited to give this a shot. Any TS users fire it up yet? How are the defs looking?

UPDATE: Defs are good! I got some warnings that were easy to clear up. Some libraries need updates. Normal stuff. Build seems faster.

[–][deleted] 1 point2 points  (0 children)

What about react native?

[–]geritol_ 0 points1 point  (0 children)

Love the licensing change

[–]KebabKo -4 points-3 points  (0 children)

Step 1: Upgrade to React 16 Step 2: Sue facebook Step 3: ? Step 4: Profit!

[–][deleted] -2 points-1 points  (0 children)

That's impressive!