We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
// ... "@antv/data-set": "^0.10.1", "antd": "^3.11.6", "axios": "^0.18.0", "bizcharts": "^3.4.3", "react": "^16.7.0", "react-dom": "^16.7.0", "react-redux": "^6.0.0", "react-router-dom": "^4.3.1", "react-scripts": "2.1.2", "redux": "^4.0.1", "redux-devtools-extension": "^2.13.7", "redux-logger": "^3.0.6", "redux-persist": "^5.10.0" // ...
<Router> <Switch> <Route path="/" exact component={IndexDom} /> <Route path="/list" exact component={ListDom} /> <Route path="/about/" exact component={DetailDom} /> <Redirect from="*" to="/" /> </Switch> </Router>
// redux import { connect } from "react-redux"; import action from "../../store/action/index"; // ... const { xxx } = this.props; // ... const mapStateToProps = state => ({ ...state }); export default connect( mapStateToProps, action )(IndexDom);
如果没有数据 变会自动跳转到首页。
export const isEmptyArray = arr => Array.isArray(arr) && arr.length === 0; if (isEmptyArray(userList)) this.props.history.push("/");
The text was updated successfully, but these errors were encountered:
No branches or pull requests
技术栈
路由
Redux
如果没有数据 变会自动跳转到首页。
The text was updated successfully, but these errors were encountered: