select-name / sharead-frontend

Book rental service
https://dev-sharead.netlify.app/
41 stars 14 forks source link

Clean-up UI-logic from events handling #6

Open azinit opened 2 years ago

azinit commented 2 years ago

EPIC: Decompose by subtasks if needed

Problem

Our components are "too smart" and it's difficult to maintain, debug and enhance

Accordingly to best practice, we should split UI and model logic explicitly. Another words - use more power from state-manager

Incorrect

image

image

Correct

https://github.com/cardbox/frontend/blob/master/src/pages/card/edit/model.ts#L45

P.S.

For any questions ping me 🚀

References