Caseflow Technical Documentation - department-of-veterans-affairs/caseflow GitHub Wiki

About this page

This is the landing page for technical documentation for Caseflow products. The goals of this documentation include:

  • Allow team members and stakeholders to learn what's under the hood in our products, without having to reference the code
  • Encourage technical documentation as features become final

Caseflow Coding Practices

WIP list of standards and practices

When to use Redux

When we initially designed the front-end we decided to store everything in the global Redux store, regardless of whether it was accessed by multiple components. We've since reversed course and are much more considerate about only putting things into the global state when they absolutely need to.

Put values in the global Redux store if any of the following are true:

  • The value is modified in more than 1 place
  • It is accessed by components that are neither siblings nor cousins (that is, two components access the same value but in order to pass that value to the components we would have to pass it through 2 or more components)

For form values, we can almost always keep the values in local state. There may be exceptions when we want to retain the form value after the component falls out of view. For example, a search bar is the only component accessing or modifying a value but we want to retain that value even if we've wandered off to some other page.