I wasn't fully across how Redux Toolkit's listener middleware worked for most of the development process - now I understand it a bit better so I'm aware of some room we have for improvement in the side effect space
This PR refactors a bunch of useEffect usages into listener middleware
I think this is a more logical separation of concerns and might (?) lead to performance improvements as these side effects will run less often now
I haven't benchmarked anything though
The remaining six useEffect usages are well justified and don't interact with the Redux store at all
Checklist
[x] I have installed pre-commit and run the hooks with pre-commit run.
[x] I have updated any related tests for code I modified or added new tests where appropriate.
[x] I have updated any relevant documentation or created new documentation where appropriate.
Purely developer-facing change so no docs are required but I did add docstrings
Description
useEffect
usages into listener middlewareuseEffect
usages are well justified and don't interact with the Redux store at allChecklist
pre-commit
and run the hooks withpre-commit run
.