How does the react server render isomorphism listen for changes in url parameters to change the display of the page?

in the past, in the react SPA project, I would listen for changes in parameters through the react lifecycle, and then re-request data, but the server rendering does not have this lifecycle, how can I listen?
original code:

componentWillReceiveProps(nextProps) {
        const { location } = this.props;
        if (nextProps.location.pathname !== location.pathname) {
            this.setMetas();
        }
    }

this componentWillReceiveProps life cycle is about to be abandoned.
just listen with subscription of redux .

Menu