- If it works for you just use single container on top of each route, othervise see 2
- Wrap a view into container whenever necessary, but always pass wrapped component via props:
// pure component's render
<foo>
<bar>
{this.props.someWrappedChild}
</bar>
</foo>
So at the end, you should get a small tree where you can see all wrapped components all the way down:
<Top>
<SomeView
form1={<SomeForm1/>}
form2={<SomeForm2
avatarField={<SmartImageUploadField/>}
/>}
/>
</Top>
Problem: what if you need to pass some props to wrapped "smart" compoent from the parent "dump" one (see avatarField
the form most likely will need to interact with that component via props)?
Possible solution: use a function then:
<SomeForm2
avatarField={props => <SmartImageUploadField {...props} />}
/>