Live data from Hacker News

React v15.5.0

facebook.github.io

131–140 of 209 posts

Re: React v15.5.0

#131
post #60

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.

I've been using Flow in my React Native app, but I still find PropTypes very useful, because warnings pop up in the iOS simulator whenever a prop is invalid. I think it's important to have both compile-time and run-time checks.

I recently (5 minutes ago) discovered 'flow-runtime' [1], which gives you the best of both worlds. It automatically generates PropTypes from your Flow types, as well as checking all of your other types at run-time.

[1] https://codemix.github.io/flow-runtime/

Re: React v15.5.0

#133
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.

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.

Let'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?

Google's responsive design looks like the last tiny island of sanity.

Re: React v15.5.0

#134
post #67

React team is doing an amazing job. I remember when it was first announced, I thought Facebook was crazy. "JSX? That sounds like a bad joke!" I don't think I've ever been so wrong. After hearing so much about React, I eventually tried it out and I realized that JSX wasn't a big deal at all, and in fact it was actually pretty awesome. Their migration strategy is great for larger actively developed applications. Since…

Agreed 100% about JSX. Especially since the only alternative anyone uses is opaque stringly-typed template nonsense (Angular, Vue, Ember, etc).

I'm not sure ember's HTMLBars (the default, a drop-in replacement for handlebars) is any more stringly-typed than JSX.

Re: React v15.5.0

#135

I cannot keep up. I just started learning react/apollo/graphql and I'm already out of date.

I figure web development today works like this: there's no reason to learn any framework thoroughly, because other people did already and there's enough them on StackOverflow to get you out of any difficult situation. The landscape moves too fast for learning anything to be worth it.

Also, most webdev is pretty throwaway, which means it's totally fine to get yourself out of trouble with piles of unmaintainable hacks. It'll all get rewritten in a new framework du jour two years from now, anyway.

Re: React v15.5.0

#136
post #44
post #35

Earlier quoted context omitted.

Are you afraid of Babel monopoly? I recommend trying https://buble.surge.sh/ . My life is much better after I started using Buble and bubleify instead of this mess that is Babel.

Come on. Buble is Babel, just with a few presets hardcoded. Yeah, it's better usability, until you need to run a production application.

https://gitlab.com/Rich-Harris/buble/blob/master/src/program... vs. https://github.com/babel/babel/blob/7.0/packages/babel-plugi...

Maybe you could explain how this is the same thing?

Re: React v15.5.0

#137

I'd like to see React support shadow-dom and web components. Not holding my breath however, since Facebook considers web components to be a "competing technology". Unlike real web components, React components are brittle since React does not have the equivalent of Shadow DOM.

Nothing stops you from using web components in React. There's even standalone (https://github.com/Wildhoney/Standalone) which allows you to transform React components into common web components.

But modelling React into web components makes about zero sense. The spec started many years ago and it is utterly outdated and useless. Web components aren't event components, they are pluggable templates. They expose all the problems and issues that React has already solved. While web components are dependent on vendor policies and specs, yet do a fraction of what a React component does, React is already out there serving apps to mobile, desktops, shell console, watches and so on - because it is what web components should have been.

Re: React v15.5.0

#138
post #102

I'd like to see React support shadow-dom and web components. Not holding my breath however, since Facebook considers web components to be a "competing technology". Unlike real web components, React components are brittle since React does not have the equivalent of Shadow DOM.

As soon as Shadow DOM v1 is implemented and active in stable in Chrome, Safari and Firefox, I am pretty sure it will start a new trend. And React might be persived like JQuery, Ember, Angular1 as a fad, that has been superseeded by new native browser capabilities. KISS. https://en.wikipedia.org/wiki/Web_Components

It won't. Web components are simple encapsulation sugar. Apps still have no means for dynamic structures while all the terrible templating pitfalls that frameworks like Angular brought are still present. React is a real solution. It isn't even a question or an "if" any longer. React has taken over, or rather, its principles have. They're clean, concise and don't twist the slightest standard all the while not breaking a sweat.

React has grown so powerful it isn't even just about the browser any longer. It runs everywhere. The browser has finally become a dumb pipe, something it should always have been. Web components are trying to reverse that, but you'd be ignoring innovation if you fell for it.

Re: React v15.5.0

#139
post #124

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't comply? I mean, creating a new type of brush for painters is ok, but I don't see the need for forcing them to redo their old paintings with the new type of brush in order to keep them visible.. IMHO Coffeescript and some other to Javascript transpilers are…

Although I don't agree with the overall sentiment of your message, I do understand your situation as a professional. In fact I believe by far the largest (less vocal) group of React users only use it at work, and never wilfully agreed to spend their spare time on GitHub because of FOMO, or fear of dependency upgrades (FODU). And I believe there should be a better way to prepare your users for a major version upgrade…

Yea, this is a good idea and something we are considering for the future!

Re: React v15.5.0

#140
post #108

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'll have to switch to create-react-class, or maintain some kind of "backports" release series for people that are still using older React versions but want bugf…

Switching to create-react-class sounds reasonable, that's what we intended. It will work in older versions too.
Post reply on HN