DEV Community

Discussion on: What's your opinion on data-first frontend ?

Collapse
 
jackmellis profile image
Jack

Yes. In my experience, useState / useEffect should be reserved for ui state only. Your application state (and general domain logic) should be kept as far away from your presentation layer as possible.

The crazy thing is, we'd developed all of these practices when redux was king. When hooks arrived, we abandoned everything and started throwing state everywhere, and now we're having to re-learn how to write sensible application state again.

Collapse
 
fly profile image
joon • Edited

When hooks arrived, we abandoned everything and started throwing state everywhere

I agree with this so much. I never really realized how disorganized my projects were becoming until I started to handle high profile ones that had relatively complex data structures and streams of data to take care of.