News for hackers. Stuff that matters.
Re:Async friendly transformation middleware for Redux by zackify on Tuesday July 04, 2017 @10:56PM (#14699710)
Do most people not have good control over the api’s they use?

I feel like I see many projects like this with the goal of transforming data or making more requests and things after each request (redux-saga).

If you have control over the api you are interacting with, most of these things aren’t needed. Plus, less work done on the client the better, right?

Re:Async friendly transformation middleware for Redux by truetuna on Wednesday July 05, 2017 @01:18AM (#14700101)
Based on my personal experience, sometimes even if the API is yours, making changes can be difficult. The example I first think of is my last company.

We had a backend and frontend team, both working on the same product but the two teams disagreed a lot and would take weeks to make a small change even if it wasn't a breaking change.

To add to it all, there wasn't a standard to deprecating APIs so even a simple key rename could cause everything to blow up. Things weren't fun so I can see the need for these kinds of tools.

Re:Async friendly transformation middleware for Redux by diggan on Wednesday July 05, 2017 @07:52AM (#14701631)
Sure, most people probably do. But some don't, and I guess in those cases it's good to have nice tooling to handle that.

Consider web applications without any backend using P2P technology, then you can't control the API, because you get sent data from other users directly. Once you deploy a new version, its useful to be able to transform that old data into the new format, if needed.

Re:Async friendly transformation middleware for Redux by molszanski on Wednesday July 05, 2017 @02:54AM (#14700385)
There is another pattern/benefit of such "client-side" transformations. You write your react components in a very generic way and rename / reshape data to fit them easily.