Commit Graph
3 Commits
Author SHA1 Message Date
David Lechner 9641898a75 actions: refactor actions
The pattern we were using for actions required actions to be defined in
three places, an enum member containing the type string, an type
definition and a function. This combines all three of these into one by
using a helper function based on the ideas from [1].

[1]: https://phryneas.de/redux-typescript-no-discriminating-union
2022-02-25 17:58:30 -06:00
David Lechner 0c20e52a45 don't allow optional args in actions
This can lead to subtle bugs.

Fixes firmware flash button not working.
2021-02-01 10:26:05 -06:00
David Lechner 6f204a65f6 reorganize src/ directory
Makes for much less scrolling/jumping around.

https://redux.js.org/style-guide/style-guide#structure-files-as-feature-folders-or-ducks
2021-02-01 10:26:05 -06:00