
React 15.4 - spicyj
https://facebook.github.io/react/blog/2016/11/16/react-v15.4.0.html
======
untog
I like React a lot, but boy. That file size is getting pretty large:

[http://elijahmanor.com/react-file-size/](http://elijahmanor.com/react-file-
size/)

Looks to be around 45KB gzipped now, to say nothing of the parse time. It's
becoming a pretty huge dependency and I wonder how much of it 90% of projects
really use. Personally, I've been getting along just fine with Preact, which
matches a lot of the API and is just 3KB gzipped:

[https://preactjs.com](https://preactjs.com)

~~~
eloisant
I often read people complaining about library size, but is there any numbers
about the actual impact on the user's perception?

i.e. how many milliseconds are we losing in parsing time or download time?

I imagine it may matter in a mobile browser but for a desktop app my intuition
tells me the difference is not noticeable.

~~~
scarlac
Every year the mobile market share grows (still) making mobile devices and
their experiences even more important.

Time lost can vary wildly. 1-10 KB seems like nothing but the collective
effect makes a difference if you have enough users.

But I think the real reason people are complaining about size is not the
potential increase for each version but the trend. Increases will accumulate
unless something is actively done.

As such, I think the push-back is fine, although I'm personally okay with the
size.

~~~
chadscira
We also should remember that most react apps are single page apps, and usually
this .js file is aggressively cached on a CDN. Most interactions are close to
instant.

Server-side rendering fixes the issue of time to first pixel. I think we don't
really need to worry about a 10KB bump, especially considering how many
websites are serving ads to mobile which are sending over MUCH MORE DATA.

I have been traveling around to many 3rd world countries, and when I hit a
website thats loading a little slow you know what I do? I wait for it to
finish loading, or I refresh. One of the biggest things a site can do to
improve speed is picking a good CDN (Cloudflare).

------
msoad
Query parameter for enabling timeline recording seems wrong. My app will
remove that query parameter because it's unknown to the server

~~~
faceyspacey
Agreed. There should be a function u can call in the console as a fallback
similar to Perfect.start(). I bet there is, they just didn't publicize it.

~~~
ggregoire
The PR:
[https://github.com/facebook/react/pull/7549](https://github.com/facebook/react/pull/7549)

~~~
Cafey
I don't see the location.search (or toggle) used anywhere in this PR :(

edit: 'isProfiling' is used but never declared so it most likely already was a
toggle they used.

~~~
evan_
They use window.location.href with a regex here:

[https://github.com/facebook/react/blob/e612826650ff68e73bff4...](https://github.com/facebook/react/blob/e612826650ff68e73bff4d71db01fea8147ee1fd/src/renderers/shared/ReactDebugTool.js#L414)

------
marclave
The first time I used react was for the beta of my project
[http://launchaco.com/](http://launchaco.com/)

One of the coolest things from this release IMO is the simulation of clicking
working now! Simulate.click()

------
Hovertruck
Watch out for third party libraries breaking with this release. A couple that
we use use were importing some modules from 'react/lib' that moved to 'react-
dom/lib' such as CSSPropertyOperations.

~~~
danabramov
These were always private APIs and will break many more times. Please file
issues with those libraries to stop using them. We will stop exposing them
completely in the future.

------
nparsons08
We just released an updated version of Winds using React 15.4 and it works
wonderfully! Looking forward to seeing the perf improvements.
[http://winds.getstream.io](http://winds.getstream.io) if you're curious to
see what we're working on at GetStream.io!

~~~
wwalser
What's your experience with Sails been like? I considered it for askinline.com
when starting but quickly abandoned ship and ended up rolling a backing using
Hapi & Sequelize. I couldn't be more satisfied with the decision.

Happy to see another RSS reader get some love.

------
joshjg
Was looking forward to better chrome timeline integration, great!

------
HugoDaniel
wow visualizing React components timings in the Chrome Timeline seems really
cool. must try it out :)

------
misiti3780
reactperf looks nice and useful. thanks for the hard work!

------
netcommentator
If you use Typescript you can get most of the benefits of React from this
little library:
[https://github.com/wisercoder/uibuilder](https://github.com/wisercoder/uibuilder)

It doesn't support fine-grained screen update but you get support for Web
Components (Polymer) which React doesn't support.

Facebook is being arrogant by not supporting the Web Components W3 standard.

~~~
Cafey
For me the best asset of React is not having to manipulate the DOM directly
with jQuery, which in my experience leads to code that injects DOM elements
from everywhere making it very difficult to maintain.

This is certainly not a replacement.

~~~
netcommentator
You can divide your page into multiple components, then to update the screen
replace the components that contain stale data. You do not have to deal with
elements--you only have to deal with components.

Regardless of which library you use there is nothing preventing you from
injecting DOM elements from everywhere. Only discipline can prevent that.

~~~
tengbretson
I guess I fail to see the value of this. If you don't want the component
lifecycle, event system, or DOM diffing that React gives you, you might as
well just write your own declarative wrapper around
`document.createElement(...)` and be done with it. You can achieve this for
templating alone in < 10 lines of code, and if you want to add some event
delegating on top of it you can include that for another ~30.

~~~
farthenfurter
Right - DOM diffing is the key selling point of React. But the fine-grained
screen updates possible via DOM diffing is not super important for most
applications.

Event system is already supported by DOM. React doesn't add anything there.
Component lifecycle is also not compelling.

~~~
tengbretson
That's kind of what I'm saying. If you don't value those things, why introduce
a library at all? What you're describing can be implemented in < 10 lines.

~~~
farthenfurter
More like 200 lines, so it is useful to have a library. BTW it is rare to hear
component lifecycle and event system described as key selling points of React.
Most people would say DOM diffing and perf are the key selling points.

~~~
magic_quotes
The _point_ of React is to make it practical to structure view logic as a
function (projection) of the application state. Virtual DOM is just an
implementation detail.

~~~
magic_quotes
By the way, for the most minimal diffing implementation see
[https://github.com/patrick-steele-idem/morphdom](https://github.com/patrick-
steele-idem/morphdom).

