nobt-io / frontend

Frontend of nobt.io.
https://nobt.io
GNU General Public License v3.0
10 stars 4 forks source link

Refactor selectors to hooks #315

Closed thomaseizinger closed 4 years ago

thomaseizinger commented 4 years ago

Within this patch set, we refactor our use of selectors and redux to use React context and hooks instead.

  1. The hooks are written in TypeScript, giving us better compile-time assertions.
  2. We should not loose any of the performance benefits of selectors if we use useMemo in our hooks. No sure if we ever had any real gains from the selectors though because we never benchmarked this stuff.
  3. I would like to slowly move away from using redux completely for the whole project. Getting rid of the selectors is the first step towards that.
  4. I also attempted to fix some bugs with this re-write.