I am trying to use react-router navigation in a button.
dashboard.js
handleClick() {
<Link to="/deneme">Deneme</Link>;
console.log('clicked!');
}
<Button color="primary" onClick={this.handleClick}>Hesapla</Button>
And i configured my route like:
index.js
<HashRouter>
<Switch>
<Route path="/" name="Home" component={Full}/>
</Switch>
</HashRouter>
Full.js
<Switch>
<Route path="/dashboard" name="Dashboard" component={Dashboard} />
<Route path="/deneme" name="Deneme" component={Deneme} />
</Switch>
handleClick
working but link doesn't work. Any suggestion?