Search code examples
reactjsreact-router-v4html5-history

Can you go backwards through react-router v4 hashHistory?


Wondering how to go back to a previous route in a react web app using hashRouter instead of browserRouter in react-router v4?

I've found this question which doesn't seem to work even though it says no browser mixin needed (plus I think its talking about an older react-router version) however, every other solution I've seen depends on browserHistory.

Is it possible with hashHistory?


Solution

  • this.props.history.goBack()
    

    Taken from the comments on this question

    It is a function call.