Closed azinit closed 4 years ago
Fun fact, there's nothing technically stopping you from writing your entire application as a single React Component. It can manage the state of your whole application and you'd have one giant render method... I am not advocating this though... Just something to think about :)
Порой - проще реализовать абстрактную струкутуру через Compound Components
More about compound components
Three articles about subcomponents
https://blog.maximeheckel.com/posts/react-sub-components-513f6679abed
This kind of pattern is really beneficial:
- using Context
- whitelist for children