react-router

    0热度

    1回答

    我正在使用react路由器v 2.8.1,并试图为我的SPA设置我的404页面。我有麻烦得到它实际发回404。我试图做到这一点,所以谷歌不会索引我的页面。 到目前为止,我已经尝试设置一个包罗万象的路线,让我的路由器内部的任何未知的路线 - <Router> ... <Route path='*' status={404} getCompon

    0热度

    1回答

    import React from 'react'; import ReactDOM from 'react-dom'; import { BrowserRouter } from 'react-router-dom'; import App from './components/App'; import registerServiceWorker from './registerServ

    0热度

    1回答

    我有以下航线, <Route exact path ='/' component={Posts} /> <Route exact path ='/:category' component={Posts} /> <Route exact path ='/new' component={NewPost} /> 的问题是,当我去/new路线,Post分量越来越与NewPost组件一起渲染为好。如

    0热度

    2回答

    我使用的反应路由器-DOM和负载部件在这样rotes: <Switch> <Route exact path="/home" component={Home} /> <Route path="/services" component={Services} /> ...and so on... <Route component={PageNotFoun

    6热度

    2回答

    运行后我有一个问题,我会发送到用户登录后反应路由器的路由,基于以下几点: ... //check login browserHistory.push(self.props.destination_url); 我期待componentDidMount运行,因为这个组件自从我加载应用程序以来就没有在屏幕上,但它不会。如果我点击导航栏中的链接(react-router链接)

    -2热度

    1回答

    我正在使用react,react-route。 我有边栏,其中我有几个页面链接,假设我在一个页面上,我有两件事 - 形式和网格,当我打开该页面时,网格出现时,当我点击添加按钮,我设置状态为假。所以我的表单打开,现在我从侧边栏点击相同的页面,然后我想显示网格而不是表单。 我该怎么做?

    0热度

    1回答

    我需要导航栏处的匹配对象。我正在使用React,Redux和TypeScript。 这里是我的启动客户端文件: import './css/site.css'; import 'bootstrap'; import * as React from 'react'; import * as ReactDOM from 'react-dom'; import {

    0热度

    1回答

    我正在使用react-redux连接函数与withRouter函数,我也试图在这里使用compose()。这是代码: export default compose ( withRouter, connect(mapStateToProps) )(Dashboard); 但是我收到一个错误: Uncaught TypeError: Converting circular st

    0热度

    1回答

    我新的工作与反应v4和我尝试重定向到另一个页面,像用户身份验证后,但我遇到了嵌套的路线问题,我已经尝试过的主页this solution和this in documentation,但不以我需要的方式工作。 这是我的index.js ReactDOM.render(( <Provider store={store}> <Router history={history}>

    0热度

    3回答

    我是新来的react-native。我们如何通过调用goBack()来刷新/重新载入前一个屏幕? 比方说,我们有3个屏幕A,B,C A -> B -> C 当我们运行在C不言而喻B屏但老态/数据GoBack的()。我们如何刷新它?构造函数不会第二次调用。