I faced this issue when I was using <Link to={}>

because was set as undefined before user input .
A quick hack was changing it to <Link to={ || '/'}> you can simply replace the / with /# or any other default route(path) .


            <Button bsStyle="primary">About</Button>

here in Link you need to add to

        <Link to="/about">
            <Button bsStyle="primary">About</Button>


Read the documentation of react-router.

The to prop is required for a Link component.


In Link you have to add "to", if you are not really using the router for anything you shouldn't use Link, but if for some reason you need it, then do it like this

<Link to="/#"><Button bsStyle="primary">About</Button></Link>

Again, if you are really using this to the router About you should use <Link to="/your-path" or whatever the route you want to using.

Update: I still don't understand why you have <button> inside your link. If for some reason you need a function, you can add onClik to the Link, and if it's for design purpose, you can add className='my-class'

Related Query

More Query from same tag