Closed Pdzly closed 11 months ago
ideally, all of these settings would be tracked using the configReducer and saved to localStorage aswell, having these in state will make writing the filter UI easier - for example my UI for searching for users will just have to dispatch to config instead of passing parameters
maybe we have a seperate reducer for anything that is ephemeral, and shouldn't be saved in localStorage...
I didnt do that because then it would be not the "React way". As then i would need to use native functions. And we would need to check if it will create a infinite loop. Because => dispatch event => changes url search params => the search params gets "changed" => dispatch event => repeat
Because you cant use react hooks in redux actions
Ohh now i understood you. But that is not the reason why the url search params are there. Its for sharing to others, bookmark multiple filters.... if i understood you now correct
yeah sorry this looks great @Pdzly :) srry i've been sidetracked the past few weeks 😑
i think i was asking this so that we can have other elements control the state, but it looks fine 😊
Thanks!
closes #118
This PR adds, to all pages search params, for users to save their filters.