Live data from Hacker News

React v15.0

facebook.github.io

171–174 of 174 posts

Re: React v15.0

#171
post #3

The referenced pull request for removing the s ( https://github.com/facebook/react/pull/5753 ) is terrific - a real paragon of open-source professionalism.

Agreed. I'm really impressed by the professionalism shown by all members of the React ecosystem. Just the other day I had noticed a org member of the reactjs org (houses react-router, redux, etc) who was acting very unprofessional and expressed that it was a turn off seeing official members of the org basically telling a issue reporter/discussion was "annoying them" and Ryan Florence stepped up and said he was not to…

That community specifically has been rude to me too. Eager to see that change for the better!

Re: React v15.0

#172

Earlier quoted context omitted.

I see your point. Indeed this does not sound very good. I don’t know enough about Relay or their plans so I can’t really say much. Nevertheless it is an ecosystem precisely because you get to pick the pieces you need. For comparison, Redux + Redux Thunk is about 3kb. Immutable is not required either. Of course your app code would have to include data fetching logic which would make it much larger. But those are all t…

I agree it's about picking and choosing the right things, but as I think we've both mentioned elsewhere, an audit and explanation of what contributes to file-size in these libraries would be super useful, for a few reasons: * It helps us justify to our bosses why a 350kb library is needed instead of a 3kb one. * It helps us understand the overall picture of JavaScript today, what kind of problems we're having to solv…

Relay was built to address concerns that our developers faced with managing data in complex apps. Needing to reimplement solutions to the same complex problems (error handling, request coordination, caching, etc) could take time away from focusing on building products. Relay helps to solve these common cases, and it sounds from your comments above ("my productivity has skyrocketed") that you've seen the benefits too - great to hear!

> Without such an explanation, we're essentially taking it on faith that these libraries are written by people who value good quality lean code.

We built something that works for us, balancing feature set, runtime performance, maintainability, code size, etc. We're continually focusing on performance - see https://github.com/facebook/relay/blob/master/meta/meeting-n... for more about what we're focusing on - but so far file size has not been the most impactful thing to work on.

As far as understanding Relay's functionality, we've covered the more obvious aspects in talks (http://facebook.github.io/relay/docs/videos.html) and in a conceptual overview (http://facebook.github.io/relay/docs/thinking-in-graphql.htm...). But an analogy to React is probably simplest. React converts declarative UI descriptions into imperative updates on the DOM. Relay is superficially similar - it converts declarative data descriptions into imperative calls - except that there is no DOM for data, so Relay also implements the query representation, object graph for cached data, networking, mutation queuing & rollback, etc.

We're also giving a tech talk about Relay internals (https://relaytechtalk.splashthat.com/) which may be of interest.

Re: React v15.0

#173

Earlier quoted context omitted.

Where should I start if I want to contribute ?

There is a tag on some Github issues "good first bug" that should be a good start. https://github.com/facebook/react/issues?q=is%3Aissue+is%3Ao... I think a lot of the core folks also hang out on IRC at #reactjs on freenode.

I think they're on Discord now on the Reactiflux server.

Re: React v15.0

#174

Earlier quoted context omitted.

I feel it's important to point out that React is now an ecosystem. Relay is comparable in size to React, then we throw Immutable into the mix, and so on. These are all dependencies that will be used on practically every page on a website, so cannot benefit from code-splitting techniques. It's certainly my experience that using React over a mess of jQuery and its plugins leads to smaller file-sizes when enhancing func…

Would it be possible to split those libraries in smaller modules? For example Preact ( https://github.com/developit/preact ) has the same basic API of React but it's just 3kb because a lot of features are stripped away in optional modules. Also, using preact-compat you could replace it as-is* in your bundle right now.

Depends if I need the features in those optional modules. An app is essentially made up from architectural modules (frameworks, alongside anything else that you use everywhere), and then specific pieces of functionality (with dependencies that are used less frequently).

If the bulk of your bundle size comes from page-specific functionality, then you can easily benefit from code-splitting and tree-shaking techniques. But those techniques won't help you at all when it's your core architecture that are enormous, because every single page on your site depends on it.

Post reply on HN