In App.js the Toolbar is mixed with the Router. In general, the router should not be mixed with other components related to UI. Relevant read about why .
One good way of reusing the the Toolbar and Footer without mixing in with the router is to create a single component (i.e. Layout) that wraps children and then you can re-use in each one of your pages, something like this :
In
App.js
theToolbar
is mixed with theRouter
. In general, the router should not be mixed with other components related to UI. Relevant read about why .One good way of reusing the the Toolbar and Footer without mixing in with the router is to create a single component (i.e.
Layout
) that wraps children and then you can re-use in each one of your pages, something like this :Child Props Example