Skip to content

Instantly share code, notes, and snippets.

@rbinksy
Last active October 16, 2015 09:24
Show Gist options
  • Save rbinksy/7fb12e8b57d019d0ed3f to your computer and use it in GitHub Desktop.
Save rbinksy/7fb12e8b57d019d0ed3f to your computer and use it in GitHub Desktop.
import React, { Component, PropTypes } from 'react';
class someComponent extends Component {
static propTypes = {
history: PropTypes.object
}
someFunction(){
//Reloads the route
this.props.history.replaceState(null, '/doc/a80bec03-c96c-4320-a013-f1f6410bae92');
//Go back one in history
this.props.history.goBack();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment