Home / Admin / om-reactv4.js
Duplicate Snippet

Embed Snippet on Your Site

om-reactv4.js

Code Preview
js
// Using React Router V4
import React from "react";
import { withRouter } from "react-router";
class App extends Component {
    componentDidMount() {
        this.unlisten = this.props.history.listen((location, action) => {
            if (window.om5678_1234) {
                window.om5678_1234.reset();
            }
        });
    }
    componentWillUnmount() {
        this.unlisten();
    }
    render() {
        return (
'<div>'{/* Your routes defined here. */}'</div>';
        );
    }
}
export default withRouter(App);

Comments

Add a Comment