Semantic-UI Sidebar.Pusher causing react router to rerender its component
I am using the react router and semantic-ui sidebar. When the sidebar is toggled between visible and invisible, the router triggers its component ( OilBarrelComponent ) to be recreated (rather than just 'pushed'). This seems unnecessary and has side effects that i don't want. Is there something wrong with my code that causes the OilBarrelContainer component to be recreated just because I toggle the sidebar? import {BrowserRouter as Router, Route, Link, Switch} from 'react-router-dom'; import {Sidebar, Segment, Button, Menu, Icon} from 'semantic-ui-react' toggleSidebarVisibility = () => this