如何从子组件中访问 react-router-redux URL 参数?

How to access the react-router-redux URL params from within a child component?

给定以下路由器:

import React, {Component} from 'react';
import {Route, Switch} from 'react-router-dom';
import {Provider as StoreProvider} from 'react-redux';
import {ConnectedRouter} from 'react-router-redux';

const App = ({store}) => {
  return (
          <StoreProvider store={store}>
            <ConnectedRouter history={history}>
              <Switch>
                <PrivateRoute path="/welcome/:welcomeId" layout={MainLayout} component={Welcome} />
              </Switch>
            </ConnectedRouter>
          </StoreProvider>
  );
};

从 'react' 导入 React; 从 'react-redux';

导入 {connect}
class Welcome extends React.Component {
  constructor(props) {
    super(props);
    console.log('constructor');
    console.log(props.params);
  }
....

为什么我在构造函数中没有得到 props.params

如果我没记错的话,可以通过props.match.params

访问参数