In RadGrad2 we are going to try an use some general design patterns for all or our React pages and components.
Pattern: Pages are responsible for managing their subscriptions
Just like RadGrad1 we are caching our subscriptions using higher order components. We want the pages to do the subscriptions so the individual components in the page just need to worry about the data they need.
Pattern: Components decide if they are reactive
The individual components get to decide what collections they watch with
Pattern: Components decide if they need to know the route
The individual components decide to use
withRouter and the RouterHelperFunctions.
Pattern: Make React Components as simple as possible
Prefer using functions and properties for your components. The general rule is if the component doesn't need state then it should be a function.