Live data from Hacker News

React v15.5.0

facebook.github.io

11–20 of 209 posts

Re: React v15.5.0

#11
For those who are interested in some of the details of the work that's going on, Lin Clark's recent talk on "A Cartoon Intro to Fiber" at ReactConf 2017 is excellent [0]. There's a number of other existing writeups and resources on how Fiber works [1] as well. The roadmap for 15.5 and 16.0 migration is at [2], and the follow-up issue discussing the plan for the "addons" packages is at [3].

I'll also toss out my usual reminder that I keep a big list of links to high-quality tutorials and articles on React, Redux, and related topics, at https://github.com/markerikson/react-redux-links . Specifically intended to be a great starting point for anyone trying to learn the ecosystem, as well as a solid source of good info on more advanced topics. Finally, the Reactiflux chat channels on Discord are a great place to hang out, ask questions, and learn. The invite link is at https://www.reactiflux.com .

[0] https://www.youtube.com/watch?v=ZCuYPiUIONs

[1] https://github.com/markerikson/react-redux-links/blob/master...

[2] https://github.com/facebook/react/issues/8854

[3] https://github.com/facebook/react/issues/9207

Re: React v15.5.0

#12
post #8

I still remember the times when warning were actual likely mistakes in your code, not "we're adding some more churn, update your stuff until we churn more". If you want people to always ignore warnings, this is how you go about it.

Baloney. This is proper release management planning. People keep complaining that React is too big and needs to shrink down. They're planning to help address those complaints by removing pieces they no longer intend to maintain, or are not the primary usage going forward. So, they're putting out a minor release that will warn people these pieces are being removed, and then they'll be removed in the upcoming major rel…

Yeah, these are basically Deprecation Warnings, which have been a standard part of good release management for a long time, across many projects in many industries.

Re: React v15.5.0

#13

For those still using propTypes, I'd recommend to take a look at Flow as replacement. https://flow.org/en/docs/frameworks/react

Flow’s interesting, unfortunately it requires more invasive changes to your code than just prop types. For example, if I remember correctly, you need a declaration for a class component’s state.

Re: React v15.5.0

#15
post #6

Big news seems to be removal of `React.createClass()` in favor of: class HelloWorld extends React.Component { }

Uh, so they take the step to 100% ES2015, yes?

You can still use the createClass API via a separate package: https://www.npmjs.com/package/react-create-class

Re: React v15.5.0

#16

I still remember the times when warning were actual likely mistakes in your code, not "we're adding some more churn, update your stuff until we churn more". If you want people to always ignore warnings, this is how you go about it.

> For each of these new deprecations, we've provided a codemod to automatically migrate your code. They are available as part of the react-codemod project.

They gave you tools to automatically fix any new warnings that came from this. I honestly don't know how they could have made it any easier.

Re: React v15.5.0

#17
Awesome changelog with great migration instructions. Bravo to the React team!

Going to set aside some hours on Saturday to upgrade our React version.

I recently started to go in with functional components where I don't need life-cycle events such as componentDidMount. Does anyone know if React is planning to make optimizations for code structured in this way?

Re: React v15.5.0

#18

For those still using propTypes, I'd recommend to take a look at Flow as replacement. https://flow.org/en/docs/frameworks/react

Flow’s interesting, unfortunately it requires more invasive changes to your code than just prop types. For example, if I remember correctly, you need a declaration for a class component’s state.

We decided to use Flow in a rewrite of an existing React project at work. I found all of the type boilerplate around React/Redux to be somewhat cumbersome at first, but after a few days I didn't even think about it anymore. It feels a little strange writing React code without it at this point.

Re: React v15.5.0

#19

Awesome changelog with great migration instructions. Bravo to the React team! Going to set aside some hours on Saturday to upgrade our React version. I recently started to go in with functional components where I don't need life-cycle events such as componentDidMount. Does anyone know if React is planning to make optimizations for code structured in this way?

Eventually, yes. The original release notes announcing functional components mentioned that they would "eventually" add some optimizations, but many people assumed that meant they already _are_ optimized. Right now, there aren't any special optimizations for functional components.

Re: React v15.5.0

#20

Earlier quoted context omitted.

Flow’s interesting, unfortunately it requires more invasive changes to your code than just prop types. For example, if I remember correctly, you need a declaration for a class component’s state.

We decided to use Flow in a rewrite of an existing React project at work. I found all of the type boilerplate around React/Redux to be somewhat cumbersome at first, but after a few days I didn't even think about it anymore. It feels a little strange writing React code without it at this point.

Same, we're using Flow in for our React Native app but not yet in our older webapp.

I've found more bugs that way that more than offset the extra time spent writing types and being a little bit more verbose to keep flow happy.

The minor annoyances are around the edge cases. Like eslint/flow throws propType errors when using props that were dereferenced from `this.props.someObject`. But you can just write the longer version `this.props.someObject.whatever` and everything's fine.

Post reply on HN