O
O
Olnimus2022-03-31 15:30:00
Frontend
Olnimus, 2022-03-31 15:30:00

Modern frontend architecture based on React and hooks. Too smart components?

With the advent of some hooks, the business logic somehow began to spread over the application.
I do not have much experience and it is not always possible to understand when a component should be clean, and when it can, for example, make a request to the server. By what criteria is it to be determined? When I wrote with ApolloClient as a state manager, I even had the impression that it was no longer important.
I would be grateful if someone shares their thoughts or a link to a resource to read.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton, 2022-03-31
@karminski

Use Redux - your question will disappear immediately. In essence, Redux implements your business logic and requests to the API server. And the components remain conditionally "stupid" (no one canceled the local state anyway)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question