otherwise good post, while I wouldn't use the name "interface" for this concept, because it could be confused also I'd prefer a Redux-less solution, probably created with useReducer or something
Thanks! I chose the name 'Interface' because it's the layer that connects the other two components and it represents the user interface. I'd appreciate any suggestions for a better name. I used Redux to show the responsibility of the Logic Hook, but it could be replaced by useReducer or anything else.
Nit: you used the list code two times.
otherwise good post, while I wouldn't use the name "interface" for this concept, because it could be confused also I'd prefer a Redux-less solution, probably created with
useReducer
or somethingThanks! I chose the name 'Interface' because it's the layer that connects the other two components and it represents the user interface. I'd appreciate any suggestions for a better name. I used Redux to show the responsibility of the Logic Hook, but it could be replaced by useReducer or anything else.
Maybe facade? That's a good pattern name that does similar things here.