-1
Now I’m using the Adonis (I love the Laravel) and doing the Reactjs case here on the blog. more I came across the following situation:
I have an admin Dashboard, where the same has:
- Header.js (navbar)
- sidebar.js (side menu)
- content js.
How do I stop every time I click on a menu item it loads the content, without having to copy all this structure on each page? type, make a template and all routes load into content?
Today my little project is like this:
route js
const Routes = () => (
<browserrouter>
<switch>
<route exact="" path="/" component="{Login}"/>
<privateroute path="/app" component="{dashboard}"/>
<privateroute path="/clientes" component="{dashboard}"/>
</switch>
</browserrouter>
)
Dashboard.js
<>
...
<route path="/clientes" component="{Clientes}"/>