I have this button console.log as a test and it is being triggered whenever I refresh the page instead of when I click a nav button. Let me know if you can see the problem with this code if you'll need more.
import React from 'react';
import SideNav from "react-sidenav";
var TeamActions = require('../actions/TeamActions');
export default class Nav extends React.Component {
pushName(name) {
TeamActions.setTeamName(name);
}
render() {
return(
<SideNav.Menu
path="#"
itemHeight="32px"
styles={{margin: "0"}}
>
<SideNav.MenuItem
itemKey="truck"
>
//this is where I'm using onClick
<SideNav.ILeftItem
className="fa fa-truck"
onClick={console.log("hello")}
>
Boston Celtics
</SideNav.ILeftItem>
</SideNav.MenuItem>