Refactor code to have a single state variable keep track of application status #1587
Open
1 of 4 tasks
Labels
draft
Feature: Code Health
Make our code more readable, testable, and modular
Needs More Info
Request for more info...Issue not clear
ready for dev lead
ready for developer lead to review the issue
Role: Frontend
React front end work
Size: 8pt
Can be done in 31-48 hours
Milestone
Overview
Currently, our app makes use of several different redux state variables to keep track of different application states such as
isDbLoading
,isMapLoading
and anerror
object (see: /redux/reducers/data.js#L137).To prevent impossible states, mitigate the misuse of and the need to maintain disparate state variables throughout our codebase, it may be prudent to combine these multiple state variables into a single state variable called
status
with each value represented by an ENUM value describing the application's current state.This would allow our components to operate on a single source of truth and avoid potential bugs
We would like a volunteer take a look at refactoring our code to make this change and apply it throughout the codebase
The Concept
Action Items
isMapLoading
,isDbLoading
anderror
object defined in /redux/reducers/data.js#L137status
and create a new status as an ENUM that corresponds to the given application state (refer toThe Concept
above)Resources/Instructions
/redux/reducers/data.js#L137
The text was updated successfully, but these errors were encountered: