Live data from Hacker News

React v17.0 Release Candidate: No New Features

reactjs.org

31–40 of 120 posts

Re: React v17.0 Release Candidate: No New Features

#31
post #3

"It has been two and a half years since the previous major release of React, which is a long time even by our standards!" As a mostly Python and only occasional JavaScript developer, it always felt like the biggest challenge in the JavaScript community was how fast everything moved - new libraries, frameworks and ideas would tumble past at the rate of one every few weeks, and it felt impossible to keep up. I've been…

I do feel like react has won

React won the spa crowd.

Lags behind in server side frameworks adoption over Vue.

React won the enterprise crowd pushing angularjs out.

React hasn't won over the JQuery crowd

If you do primary js it probably has. If you only do some js and other things it probably hasn't yet.

Re: React v17.0 Release Candidate: No New Features

#32

Earlier quoted context omitted.

`redux@^4` currently has two dependencies: `symbol-observable` for compat with observable libs, and `loose-envify` for compat with Browserify. I plan on removing both of those when we release Redux v5. Our official Redux Toolkit package [0], which is now our recommended approach for writing Redux logic, _does_ have a few more deps: Immer, Reselect, Redux-Thunk, and the Redux core. But, those are all things you probab…

Thanks for your work on it. I've found Redux super-helpful and pleasant to use for multi-platform JS UI work, in particular, to bundle HTTP client (and other network services, if not in the browser) libs behind a common, small, well-understood-by-React-devs state interface. I'm a huge fan of dependencies I can abuse—fake-up in an afternoon on unsupported platforms in another language, rip out of one place and cram in…

Thanks!

Quick summary:

Immer is an incredibly useful immutable update library, created by Michel Weststrate (author of MobX).

It exports a single function `produce(originalState, updateCallback)`. The callback receives a `draftState` value that _looks_ like your original state, but has been wrapped in an ES6 Proxy. You can then "mutate" the draft all you want. Internally, Immer tracks all the mutations, and the final result is a safely immutably-updated value.

It drastically simplifies immutable update logic - no more nested spread operators!

See https://immerjs.github.io/immer/docs/introduction and https://redux.js.org/recipes/structuring-reducers/immutable-... .

Redux Toolkit comes with Immer built into our `createReducer` and `createSlice` APIs automatically.

Re: React v17.0 Release Candidate: No New Features

#34
post #31

Earlier quoted context omitted.

I do feel like react has won

React won the spa crowd. Lags behind in server side frameworks adoption over Vue. React won the enterprise crowd pushing angularjs out. React hasn't won over the JQuery crowd If you do primary js it probably has. If you only do some js and other things it probably hasn't yet.

> Lags behind in server side frameworks adoption

What do you mean by this? Which server-side frameworks? Are you comparing Next and Nuxt?

Re: React v17.0 Release Candidate: No New Features

#35
I'm excited to see the work on the Modern Event System land. I tried to dig into all the events code in React to understand how events in React Portals bubbled up because I wanted to prevent them from bubbling out of the portal in many cases (GH issue: https://github.com/facebook/react/issues/11387). In 16.x, the modern event system was in the tree but unused by default, and it was very confusing to try to trace event handling logic between the two event systems. Removing the legacy event system will make the event system much more accessible to new contributors.

Can someone on the React team speak to how event delegation works when there are portals present? Where is the event handler for a portal bound, and how does the new events system handle event bubbling across multiple versions of React in portal trees?

Re: React v17.0 Release Candidate: No New Features

#36
Was just thinking that we're probably due for a major release sometime now that Concurrent Mode seems to be starting to mature a little (disclaimer: it's still experimental, don't use it in production yet, etc.)

I'm sure the React team must be eager to get all the juicy changes out of the experimental branch and into the hands of developers. So it's great to see though that they're still taking their time to do it properly. Looking forward to seeing what come nexts :)

Re: React v17.0 Release Candidate: No New Features

#37
post #7

React hooks is influenced by Dan, the author of Redux, not a fan of them both

How about you don't make it personal, and limit whatever criticism you have to technology. And why not include actual criticism, rather than just stating that you personally are not a fan. Thanks for the pointless comment otherwise.

Re: React v17.0 Release Candidate: No New Features

#38
post #34
post #31

Earlier quoted context omitted.

React won the spa crowd. Lags behind in server side frameworks adoption over Vue. React won the enterprise crowd pushing angularjs out. React hasn't won over the JQuery crowd If you do primary js it probably has. If you only do some js and other things it probably hasn't yet.

> Lags behind in server side frameworks adoption What do you mean by this? Which server-side frameworks? Are you comparing Next and Nuxt?

(not GP) with React, declarative JavaScript code can result in HTML. JS -> HTML

Server side frameworks (the usual favourites) have existing ways for code to result in HTML. Ruby/PHP/Java -> HTML

Vue on the other hand can sit within HTML. So you can sprinkle in client-side logic in the views while still generally going with the grain of your server side framework.

https://gitlab.com/gitlab-org/gitlab/-/blob/6cece3f49eb87779...

See `if can?(current_user, :admin_issue, @project)` (Ruby) and `"v-if" => "issue.labels.length === 0"` (Vue)

Re: React v17.0 Release Candidate: No New Features

#39
It's refreshing to see a major release of a frontend library that doesn't completely redo the API (React Router and Angular, take note). I remember there was a time when a bunch of features were being considered to be bolted on to JSX which was going to be called JSX 2.0[0]. I'm glad that never happened. Maybe the next version of React can even remove features, like hooks.

0. https://github.com/facebook/jsx/issues/65

Re: React v17.0 Release Candidate: No New Features

#40
post #30

I've become increasingly disillusioned with the JS ecosystem over the past couple of years, but React still delivers. I can still chuck it in a script tag and start writing components if needed (without JSX). I haven't really used hooks yet and don't plan to, but as long as "legacy" class based components are supported, I will use them. Thanks for maintaining backward compatibility, which is not very common in the JS…

Just chiming in to say that I too hope class components will continue to be supported. I worry that they'll announce otherwise in a couple years.

Class components are so stupidly simple to read and write. I appreciate the work put into function components, but to me they make things unnecessarily complex. Just the fact that they took callbacks and other functions from methods – where things are separate, clean, standard – to nested functions – where things are not separate (some local variables, some closure variables), not clean (no possible way to unit test a nested function in isolation), and not standard (object methods are a language feature, use them!) – seems like a huge step backward.

Post reply on HN