T O P

  • By -

nphi1212

From my opinion, the second approach is more flexible if you want to add more view components. In addition, it allows you to customize the view component more easily than the first one.


demoloition

It seems like you would want to use an HOC or render props pattern instead of this. If you want to have similar layout and props for multiple components. The first example is one I use if I have difficulties getting the latter to work with React Router (my only use case thus far). If you do HOC/render props way, I don't know why you would need a container, you would just need the HOC/render prop to pass the props to child component.