Open
Description
From review in #136:
- Did you consider lifting the state up? I think this might make the implmentation a bit neater.
keyboardController.keys
could be passed toControlsModal
. You could then have asetKey
method onKeyboardController
that was passed all the way down to each row. That way the state management and business logic is all inKeyboardController
. - Is there a reason why it is persisted on unload rather than on every key change? I would have thought setting local storage is pretty cheap. That way you wouldn't have to check if state were modified and the keys would still persist if unload wasn't called for whatever reason.