DEV Community

Discussion on: Pure Components, Interfaces and Logic Hooks.

Collapse
 
kayis profile image
K • Edited

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 something

Collapse
 
charbelrami profile image
Charbel Rami • Edited

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.

Collapse
 
jonocodes profile image
Jonathan Stiansen

Maybe facade? That's a good pattern name that does similar things here.