Hacker News new | past | comments | ask | show | jobs | submit login

Personally, I find Redux to be a joy to use and write code with. I agree that there is a lot of "boilerplate" for new developers, as Redux does not really come with a batteries-included "framework" to build CRUD apps -- that's on you to figure out and write.

One you do write this framework in Redux, however, you can reuse it and the amount of unnecessary boilerplate goes to near zero in my experience.

We just need a de facto open source framework built on top of Redux for people who haven't worked with it extensively to build with.




I know. I've seen _many_ other higher-level abstractions on top of Redux (per my comment elsewhere in the thread). A year ago, I opened up an issue [0] to discuss ways we could improve the "getting started" experience, reduce boilerplate, add better abstractions on top of the base primitives, etc. The thread got some decent comments, but nothing really concrete came out of it.

A few months ago I had a little bit of free time, and threw together a tiny "starter kit" library [1] that is intended to simplify a couple of the common pain points (basic store config, and writing reducers with immutable updates). I haven't had time to push it further, but long-term it's likely to become an official Redux-branded "use this to get started" addon.

I'm very open to further ideas and suggestions around this topic.

[0] https://github.com/reactjs/redux/issues/2295

[1] https://github.com/markerikson/redux-starter-kit


Cool! I hadn't seen that. I like the idea of a solid starter kit library, although (from quickly reading the README for your starter kit) I think it should probably include more: specifically facilities for making HTTP calls, serializing/deserializing request and response data, caching data and fetch status for the requests, etc.

From working with people who haven't used Redux before - these seem to be common things people new to Redux want to do but find difficult to get started. (The boilerplate around making actions and switch statements, etc. seems a bit secondary in my opinion)

However, I realize the "proper" way to do the things I listed above is inherently pretty opinionated, so I totally understand why the Redux library itself has avoided including these things (it's much more flexible as-is; and probably why it's been so stable and stood the test of time).


Yeah, that gets _wayyyyy_ past what I want to do.

There are quite a few existing libs for doing data fetching and collection management ( https://github.com/markerikson/redux-ecosystem-links/blob/ma... ), ranging from simple normalized reducers to complex "auto fetch from a REST or JSON-API and provide full CRUD support" libs.

I simply don't understand the complaints about switch statements myself, but it keeps coming up, so it seemed like a simple enough starting point for a "starter kit" library like this.


So I've been working at that. Is this the kind of thing you are looking for?

https://github.com/tjdavies/hyper-redux




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: