Live data from Hacker News

State of JavaScript 2019

2019.stateofjs.com

31–40 of 372 posts

Re: State of JavaScript 2019

#31

Redux has the largest shift towards "negative opinion" out of all technologies. Did people just get fed up with the boilerplate or is there something else going on?

Hi, I'm a Redux maintainer.

There's been a lot of reasons for a shift in opinions over the last few years:

- Redux is well past the initial burst of enthusiasm in the "hype cycle"

- As you mentioned, there are a number of common concerns expressed by a lot of folks, most of which revolve around "boilerplate"

- There are now a wider variety of other options that overlap with ways you'd use Redux: React's Context and Hooks APIs, MobX, GraphQL / Apollo Client, etc. These don't completely replace Redux, but they do overlap enough that there's not as much _need_ to choose Redux for everything.

- And, frankly, Redux _has_ been overused in a number of cases. Folks assume you _have_ to use Redux with React, sometimes because a senior dev told them so, because they saw yet another tutorial that pairs them together, or because it was asked for in a job listing.

Now, Redux is definitely not dead or dying. My own estimates are that around 50% of React apps are using Redux, and the overall total download trends are still increasing. But, it's also true that the market share will continue to spread out a bit over time.

I talked about these aspects in my Reactathon 2019 talk on "The State of Redux" [0] and my post "Redux - Not Dead Yet!" [1].

Besides all that, we're doing a lot of work to make it easier for folks to learn and use Redux.

- We have a new official Redux Toolkit package [2] [3]. It includes utilities to simplify several common Redux use cases, including store setup, defining reducers, immutable update logic, and even creating entire "slices" of state at once. It's now our recommended approach for writing Redux logic, and the feedback from folks who have adopted it has been amazingly positive.

- We are currently working on a major rewrite of the Redux core docs [4]. As part of that, we've already added a new "Style Guide" page [5] with our recommended best practices and guidelines for writing good Redux code, like structuring files as "feature folders" or "ducks", modeling actions as "events" instead of "setters", and so on. We're also going to completely redo all the tutorials and examples to show easier patterns to work with, drop outdated references to concepts and terms like "Flux" and "container components", and emphasize use of Redux Toolkit as the standard way to write Redux apps.

- Our new React-Redux hooks API [6] makes it a lot easier to work with Redux data in React components compared to the standard `connect` API, especially if you're using TypeScript.

So yeah, there are some repeated waves of annoyance with Redux that pop up on social media every so often, but there's also a ton of folks still using and learning Redux. My goal is to continue to make it easier for Redux users of all levels to use Redux.

[0] https://blog.isquaredsoftware.com/2019/03/presentation-state...

[1] https://blog.isquaredsoftware.com/2018/03/redux-not-dead-yet...

[2] https://redux-toolkit.js.org

[3] https://blog.isquaredsoftware.com/2019/10/redux-starter-kit-...

[4] https://github.com/reduxjs/redux/issues/3592

[5] https://redux.js.org/style-guide/style-guide

[6] https://react-redux.js.org/api/hooks

Re: State of JavaScript 2019

#32
post #5

Sad to see Ionic in the avoid category. Their latest release I thought was quite polished, and I've enjoyed using Capacitor rather than Cordova. I think the key to further success is breaking away from Cordova entirely, and expanding the native features supported in Capacitor. Right now I find myself having to use both due to some things not being implemented in Capacitor yet.

At this point with React Native (or even Flutter if we're considering things apart from JS) there really isn't a compelling reason to build anything in a Webview as far as I know. Also in my personal experience their support team members have been pretty impatient and passive aggressive in the Github issues tickets so I'm not entirely surprised that they're building something that the community has moved away from.

> there really isn't a compelling reason to build anything in a Webview as far as I know.

Neither RN nor Flutter fulfill the promise of, "write once, run everywhere", whereas Ionic, warts and all, does today.

Maybe Flutter web will work out though, we'll see. If Dart evolves then Flutter becomes a pretty compelling stack.

Re: State of JavaScript 2019

#33

What a holy mess is the landscape of the testing frameworks, even worse than that of the front end frameworks itself.

This is incredibly true. Testing libraries have not kept up with changes to JavaScript and web dev in general.

I long for a test runner that does as little magic as possible, doesn't try to be a build system and module loader, doesn't inject random libraries into the environment, it just loads URLs and reports back test results.

Test runners and assert libraries can massively slim down too if they because simple importable modules and don't modify the global environment or create plug-in systems or complex test lifecycles. Tests are async functions that resolve or reject, that's it.

Re: State of JavaScript 2019

#34
post #27

Redux has the largest shift towards "negative opinion" out of all technologies. Did people just get fed up with the boilerplate or is there something else going on?

I started to realize that it just doesn't make a lot of sense. It doesn't actually have a real concept of how to deal with asynchronous things (like, http requests). You have to use weird things like redux-thunk, or god forbid redux-saga. The event system is basically synchronous, and just changes data which will be displayed in the UI. Why use the event abstraction and all the boilerplate that entails for synchronou…

Thunks are hardly "weird". The thunk middleware is only about 12 lines long, and it's just a way to let you write arbitrary code that has access to `dispatch` and `getState` without being tied to a specific store instance.

Thunks are our recommended standard way to write async logic in Redux apps [0], and our new official Redux Toolkit package [1] automatically sets up thunks by default as part of the store configuration.

Sagas are incredibly powerful, but most apps don't need them [2]. They're most useful when you need complex "background thread"-like behavior.

And no, Redux is definitely _not_ eliminated or replaced by hooks [3] [4].

[0] https://redux.js.org/style-guide/style-guide#use-thunks-for-...

[1] https://redux-toolkit.js.org

[2] https://redux.js.org/faq/actions#what-async-middleware-shoul...

[3] https://blog.isquaredsoftware.com/2019/03/presentation-state...

[4] https://blog.isquaredsoftware.com/2018/03/redux-not-dead-yet...

Re: State of JavaScript 2019

#36

I find it kinda strange that Flow has been relegated to the write-in "Other Flavours" section so soon. I know that it has been trending downwards for a while (as TypeScript trends upwards), but it feels like that story's not quite over just yet even if the conclusion is foregone.

I think the name Facebook being attached to just about anything is a disadvantage, if there are other alternatives.

Doesn't seem to have been a problem for React/PyTorch/GraphQL.

Although perhaps I'd agree, actually. I'm not sure. It's at least not a huge deterrent.

Re: State of JavaScript 2019

#37

So sad to see Meteor solidly in the avoid quadrant, but it seems deserved. Meteor is what I learned how to do web development with back in 2015, and it was fun . It didn't take much to make stuff happen, and the baked-in live sync was like magic. I'm still eager to whip Meteor out for proof of concept prototyping because of how convenient it is to have a schemaless database and a framework that abstracts away HTTP, b…

Where did you see a ClojureScript satisfaction rating? All I'm seeing is the have you used it before/heard of it question.

Re: State of JavaScript 2019

#38

I find it kinda strange that Flow has been relegated to the write-in "Other Flavours" section so soon. I know that it has been trending downwards for a while (as TypeScript trends upwards), but it feels like that story's not quite over just yet even if the conclusion is foregone.

I think the name Facebook being attached to just about anything is a disadvantage, if there are other alternatives.

3 out of 4 most liked technologies are actually from Facebook, so the name certainly doesn't seem to prevent success here..

Re: State of JavaScript 2019

#39

EmberJS should not be in the "avoid' section.. it is one of the most well thought-out framework which just gets the job done.. and it is a bit contra-indicatory that Ember guys are the highest paid.

Completely agree, the framework garnered somewhat of a bad rap in the past for being "bloated", "magical", and having a high learning curve with a rigid philosophy of conventions over configuration. But fast-forward and today, ember.js is a fast, capable, full-featured, and well-supported web framework that allows building durable web applications made to last. It's used by many of the largest companies in the world including LinkedIn, Apple, Twitch, Netflix, Intercom, Princess Cruises, numerous startups and everything in-between. I highly recommend anyone with an interest to check out the coming Octane Edition which is about to land and is a significant step forward for the framework:

https://emberjs.com/editions/octane

https://octane-guides-preview.emberjs.com/release/getting-st...

Re: State of JavaScript 2019

#40

Wow, 39.9% of respondents mark themselves as "Expert" at CSS. I've been doing front-end in various guises for 12 years and I would only rank myself maybe 5 or 6 out of 10. As I've gotten more experienced in my career I've become more aware of what I don't know as opposed to what I do know. It's funny that "Advanced" is mastering animations and transitions whereas "Expert" is being able to develop a full-front end con…

[deleted]
Post reply on HN