pages-core icon indicating copy to clipboard operation
pages-core copied to clipboard

chore: improve component separation of concerns, hooks, purity

Open drewbo opened this issue 1 year ago • 1 comments

Changes proposed in this pull request:

  • Updates to each page component 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

drewbo avatar Oct 21 '24 14:10 drewbo

@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)

drewbo avatar Oct 23 '24 21:10 drewbo