This story on HackerNoon has a decentralized backup on Sia.
Transaction ID: 6gJV-6SOtm172P3uo5IPNKorVSv7J0yfJjCgRAfo0IE
Cover

Handling Loading Actions: The Proper Way in Redux

Written by @mtroskot | Published on 2020/1/7

TL;DR
Don’t put UI logic into reducers instead put it into a separate reducer. When handling asynchronous actions in your application, most of the time you want to let users know that their request is being executed in form of some loading indicator. The problem is that in our case news can be FETCHED, PUBLISHED, UPDATED, DELETED, REFRESHED and to display loading indicators for each action on different parts of the screen we would need to have 5 flags. Having booleans in. reducers for loading flags has its limitations. Everytime we want to start and stop a loading action we have to do it manually.

[story continues]


Written by
@mtroskot
Technical Writer on HackerNoon.

Topics and
tags
javascript|software-development|react|programming|redux|ui|redux-saga|tutorial
This story on HackerNoon has a decentralized backup on Sia.
Transaction ID: 6gJV-6SOtm172P3uo5IPNKorVSv7J0yfJjCgRAfo0IE