Answers for "how to make back button react"

0

how to make back button react

const BrowserHistory = require('react-router/lib/BrowserHistory').default;

const App = React.createClass({
    render: () => {
        return (
            <div><button onClick={BrowserHistory.goBack}>Go Back</button></div>
        );
    }
});

React.render((
    <Router history={BrowserHistory}>
        <Route path="/" component={App} />
    </Router>
), document.body);
Posted by: Guest on October-22-2020

Code answers related to "how to make back button react"

Code answers related to "Javascript"

Browse Popular Code Answers by Language