A
A
Arthur2019-09-24 14:11:24
React
Arthur, 2019-09-24 14:11:24

How to organize react with hooks instead of containers?

I deal with hooks, as I understand it, they are designed to replace containers.
I can't figure out how to organize the repeating logic now? Move hooks to separate files?
Previously, the project structure was

  • components - only stupid
  • containers - smart ones that return stupid ones with data
  • pages - pages that return containers and components

If you refuse container components when working with hooks, then how does the removal of reusable logic take place and how is it organized?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
abberati, 2019-09-24
@abberati

Hooks do not replace containers, but class components.
Containers remain containers.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question