These 2 Questions you have to ask yourself when building React Apps
The 2 questions are,
- Do I have to split this into multiple components?
- Do I have to keep all of this together as one big component?

I have been using React for 12 months. I have also observed people use this library. I have done a lot of debugging and fixing of errors in several React Apps and these 2 questions always come out when fixing issues around how data flows through React Apps.
- Why did you decide to split this into multiple components?
- Why did you decide to keep all of this together as one big component?
So why should you ask yourself these 2 questions?
I personally do not like the idea of jumping straight to writing code to solve a problem without giving it enough thoughts. What you end up with is getting stuck in the middle of the problem and not knowing what to do. Like your vehicle breaking down after you have covered half of your journey and there’s no way for you to fix it.
React developers can write,
<p>{this.props.task.name}</p>
as some JSX to render in their app.
And they get an error in the console saying “Cannot read property name of undefined”.
What a nasty error this is.
For those who have taken a beaten from this error before, you know how this can take away most of your precious time.
The error talks about a developer who is expecting a task but got nothing. If you ask yourself these 2 to very important questions on whether you should keep components as one or split it apart then you are most likely to avoid this nasty error.
I want you to always ask yourself whether it is necessary to split up your components or build a single component React App.

