pages-core
pages-core copied to clipboard
chore: improve component separation of concerns, hooks, purity
Changes proposed in this pull request:
- Updates to each
pagecomponent with the following heuristics in-mind:- Move things to custom hooks where possible (separation of concerns and will make it easier for us to standardize fetching logic, potentially with react-query)
- Move larger chunks of rendering logic into separate components (better modularity, testing, pure rendering)
- Try component composition where applicable (increase readability, avoiding giant immediately invoked functions)
security considerations
None
@apburnes I updated this to re-nest all the page templates to follow a file-based routing system (even though we're still using component based). I also removed four unused components, and moved things out of shared if they are only used by a single page (with the one exception of FilterIndicator which @sknep did such a nice job of writing in an abstract way that I feel like it warranted staying in shared and hoping for a future use)