简体   繁体   中英

Splitting the page into different React components

I am new to Reactjs. I am super duper confused when it comes to splitting the page to different components. What should I consider when I divid the page into different components?

When you want to split into separate components, it becomes a bit of a challenge to share data between them. One way is for the parent to share state through props and actions to the children, but this ends up being messy, and your components depend pretty much on each other.

Most people do it using Redux, although you can do it with Observables or mobX.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM