April 2018
Intermediate to advanced
284 pages
6h 43m
English
In our application, Seat List is responsible of fetching the data and rendering it. This is okay and works well for small or sample applications, but with this, we lose a few benefits of React, one of which is reusability. SeatList can't be reused easily unless under the exact same circumstances, so what's the solution?
We know that this kind of issue is common across different programming languages, and we have solutions in terms of Design Patterns. Similarly, the solution to our problem is a pattern called Container Component pattern.
So, instead of our React component, out Container component will take the responsibility of fetching the data and passing it to the corresponding subcomponent. In simple ...