TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

React v15.5.0

453 pointsby shahzebabout 8 years ago

22 comments

acemarkeabout 8 years ago
For those who are interested in some of the details of the work that&#x27;s going on, Lin Clark&#x27;s recent talk on &quot;A Cartoon Intro to Fiber&quot; at ReactConf 2017 is excellent [0]. There&#x27;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 &quot;addons&quot; packages is at [3].<p>I&#x27;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 <a href="https:&#x2F;&#x2F;github.com&#x2F;markerikson&#x2F;react-redux-links" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;markerikson&#x2F;react-redux-links</a> . 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 <a href="https:&#x2F;&#x2F;www.reactiflux.com" rel="nofollow">https:&#x2F;&#x2F;www.reactiflux.com</a> .<p>[0] <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=ZCuYPiUIONs" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=ZCuYPiUIONs</a><p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;markerikson&#x2F;react-redux-links&#x2F;blob&#x2F;master&#x2F;react-implementation.md#react-fiber" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;markerikson&#x2F;react-redux-links&#x2F;blob&#x2F;master...</a><p>[2] <a href="https:&#x2F;&#x2F;github.com&#x2F;facebook&#x2F;react&#x2F;issues&#x2F;8854" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;facebook&#x2F;react&#x2F;issues&#x2F;8854</a><p>[3] <a href="https:&#x2F;&#x2F;github.com&#x2F;facebook&#x2F;react&#x2F;issues&#x2F;9207" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;facebook&#x2F;react&#x2F;issues&#x2F;9207</a>
评论 #14064449 未加载
评论 #14064450 未加载
TheAceOfHeartsabout 8 years ago
React team is doing an amazing job. I remember when it was first announced, I thought Facebook was crazy. &quot;JSX? That sounds like a bad joke!&quot; I don&#x27;t think I&#x27;ve ever been so wrong. After hearing so much about React, I eventually tried it out and I realized that JSX wasn&#x27;t a big deal at all, and in fact it was actually pretty awesome.<p>Their migration strategy is great for larger actively developed applications. Since Facebook is actually using React, they must have a migration strategy in place for breaking changes. Since breaking anything has such a big impact on the parent company, it makes me feel like I can trust em.<p>Heck, most of the items in this list of changes won&#x27;t surprise anyone that&#x27;s been following the project. Now there&#x27;s less magic (e.g. React.createClass with its autobinding and mixins), and less React-specific code in your app (e.g. react-addons-update has no reason to live as a React addon when it can clearly live as a small standalone lib).
评论 #14065062 未加载
评论 #14064517 未加载
评论 #14064499 未加载
STRMLabout 8 years ago
This is a big deal to deprecate `createClass` and `propTypes`.<p>PropTypes&#x27; deprecation is not difficult to handle, but the removal of createClass means one of two things for library maintainers:<p>(1). They&#x27;ll depend on the `create-class` shim package, or,<p>(2). They must now depend on an entire babel toolchain to ensure that their classes can run in ES5 environments, which is the de-facto environment that npm modules export for.<p>I&#x27;m concerned about (2). While we are probably due for another major shift in what npm modules export and what our new minimum browser compatibility is, the simple truth is that most authors expect to be able to skip babel transcompilation on their node_modules. So either all React component authors get on the Babel train, or they start shipping ES6 `main` entries. Either way is a little bit painful.<p>It&#x27;s progress, no doubt, but there will be some stumbles along the way.
评论 #14064526 未加载
评论 #14064539 未加载
评论 #14065427 未加载
评论 #14064494 未加载
评论 #14064512 未加载
评论 #14064637 未加载
ggregoireabout 8 years ago
For those still using propTypes, I&#x27;d recommend to take a look at Flow as replacement.<p><a href="https:&#x2F;&#x2F;flow.org&#x2F;en&#x2F;docs&#x2F;frameworks&#x2F;react" rel="nofollow">https:&#x2F;&#x2F;flow.org&#x2F;en&#x2F;docs&#x2F;frameworks&#x2F;react</a>
评论 #14064510 未加载
评论 #14064429 未加载
评论 #14064424 未加载
评论 #14066424 未加载
评论 #14066379 未加载
评论 #14064181 未加载
评论 #14064196 未加载
amk_about 8 years ago
The breakup of the React package into a bunch of smaller modules really puts packages that treat React as a peer dependency in a pickle. I have a component module using createClass that works fine and exports a transpiled bundle in package.json. I guess now we&#x27;ll have to switch to create-react-class, or maintain some kind of &quot;backports&quot; release series for people that are still using older React versions but want bugfixes.<p>Anyone have experience with this sort of thing?
评论 #14066705 未加载
nodesocketabout 8 years ago
Big news seems to be removal of `React.createClass()` in favor of:<p><pre><code> class HelloWorld extends React.Component { }</code></pre>
评论 #14064610 未加载
评论 #14066007 未加载
评论 #14064120 未加载
huellerabout 8 years ago
This is a good move. Modernization with sensible deprecation and scope re-evaluation with downsizing when more powerful alternatives exist. Too often codebases get bigger when they should really get smaller.
smdzabout 8 years ago
I absolutely love how React+TypeScript setup handles PropTypes elegantly. And then you get the amazing intellisense automatically.<p>```<p>interface State {}<p>interface ISomeComponentProps {<p><pre><code> title: string; tooltip?: string .... </code></pre> }<p>@ReduxConnected<p>export class SomeComponent extends React.Component&lt;ISomeComponentProps, State&gt; {<p>....<p>```
uranianabout 8 years ago
What is this problem in the Javascript landscape to keep forcing developers to do things differently, with the penalty of your app not working anymore if you don&#x27;t comply?<p>I mean, creating a new type of brush for painters is ok, but I don&#x27;t see the need for forcing them to redo their old paintings with the new type of brush in order to keep them visible..<p>IMHO Coffeescript and some other to Javascript transpilers are still a much better language than the entire Babel ES5&#x2F;ES6&#x2F;ES7 thing. But for some reason my free choice here is in jeopardy. The community apparently has chosen for Babel and are now happily nihilating things that are not compatible with that.<p>In my opinion this is not only irresponsible, but very arrogant as well.<p>Although I do understand and can write higher order components, I still write and use small mixins in projects because it works for me. I also use createClass because I enjoy the autobinding and don&#x27;t like the possibility to forget calling super.<p>Now I need to explain my superiors why this warning is shown in the console, making me look stupid using deprecated stuff. And I need to convince them why I need to spend weeks rewriting large parts of the codebase because the community thinks the way I write is stupid. Or I can of course stick to the current React version and wait until one of the dependencies breaks.<p>It would be really great if library upgrades very, very rarely break things. Imagine if all the authors of the 60+ npm libs I use in my apps are starting to break things this way, for me there is no intellectual excuse to justify that.
评论 #14066213 未加载
评论 #14067939 未加载
PudgePacketabout 8 years ago
Why do React and other js libraries emit warnings as console.error when browsers support console.warn?
评论 #14065178 未加载
sergiotapiaabout 8 years ago
Awesome changelog with great migration instructions. Bravo to the React team!<p>Going to set aside some hours on Saturday to upgrade our React version.<p>I recently started to go in with functional components where I don&#x27;t need life-cycle events such as componentDidMount. Does anyone know if React is planning to make optimizations for code structured in this way?
评论 #14064296 未加载
Rapzidabout 8 years ago
Fiber is what I&#x27;m really waiting for. Not much official chatter about it, but looks like a 16 release?<p>They just removed some addons in master that many third party packages rely on, including material-ui. Hopefully these other popular packages can be ready to go with the changes when the fiber release hits.
评论 #14064118 未加载
评论 #14066718 未加载
评论 #14065087 未加载
whitefishabout 8 years ago
I&#x27;d like to see React support shadow-dom and web components. Not holding my breath however, since Facebook considers web components to be a &quot;competing technology&quot;.<p>Unlike real web components, React components are brittle since React does not have the equivalent of Shadow DOM.
评论 #14066654 未加载
评论 #14066737 未加载
评论 #14065509 未加载
baron816about 8 years ago
I hate that the React team prefers ES6 classes. This is what I do:<p>function App(params) { const component = new React.Component(params);<p><pre><code> component.lifeCycleMethod = function() {...}; component.render = function() {...}; function privateMethod() {...} return component; }</code></pre>
评论 #14064599 未加载
评论 #14065055 未加载
评论 #14064705 未加载
xamuelabout 8 years ago
Happy to see propTypes getting shelved. Too many people stubbornly use propTypes even in Typescript projects. Hopefully this change will usher in the final stamping out of that.
评论 #14066453 未加载
评论 #14065077 未加载
评论 #14065041 未加载
bsimpsonabout 8 years ago
Of course, you&#x27;d need to use super appropriately, but I wonder if anyone&#x27;s taken a stab at porting React mixins to ES2105 mixins:<p><a href="http:&#x2F;&#x2F;justinfagnani.com&#x2F;2015&#x2F;12&#x2F;21&#x2F;real-mixins-with-javascript-classes&#x2F;" rel="nofollow">http:&#x2F;&#x2F;justinfagnani.com&#x2F;2015&#x2F;12&#x2F;21&#x2F;real-mixins-with-javascr...</a>
Drdrdrqabout 8 years ago
Just curious: did Facebook change the license? AFAIK they can revoke permission to use from 3rd parties. Am I mistaken? If not, isn&#x27;t this a huge risk for startups?
评论 #14067155 未加载
ksherlockabout 8 years ago
So... create-react-class is an unrelated node module. react-create-class (the correct one, I guess) is completely empty, other than the package.json.
评论 #14064579 未加载
评论 #14064569 未加载
评论 #14064559 未加载
iLemmingabout 8 years ago
I wonder how these changes would affect Clojurescript libs built on top of React, e.g.: Om.Next and Reagent
aswansonabout 8 years ago
I cannot keep up. I just started learning react&#x2F;apollo&#x2F;graphql and I&#x27;m already out of date.
评论 #14066711 未加载
评论 #14066535 未加载
revelationabout 8 years ago
I still remember the times when warning were actual likely mistakes in your code, not &quot;we&#x27;re adding some more churn, update your stuff until we churn more&quot;.<p>If you want people to always ignore warnings, this is how you go about it.
评论 #14064151 未加载
评论 #14064228 未加载
评论 #14064154 未加载
lngnmnabout 8 years ago
Why people are always end up with J2EE-like bloatware? There must be some pattern, something social. It, perhaps, has something to do with the elitism of a being a framework ninja, a local guru who have memorized all the meaningless nuances and could recite the mantras, so one could call oneself an expert.<p>The next step would be certification, of course. Certified expert in this particular mess of hundred of dependencies and half-a-dozen tools like Babel.<p>Let&#x27;s say that there is a law that any over-hyped project eventually would end up somewhere in the middle between OO-PHP and J2EE. Otherwise how to be an expert front-end developer?<p>Google&#x27;s responsive design looks like the last tiny island of sanity.
评论 #14066758 未加载