react-router

    0熱度

    1回答

    我開始使用typescript和redux,並且在引導我的應用程序時遇到以下錯誤。 Type '{ store: Store<IRootState>; }' is not assignable to type 'IntrinsicAttributes & Store<IRootState> & { children?: ReactNode; }'. Type '{ store: Store<I

    0熱度

    1回答

    我對React JS非常陌生,並試圖用它構建一個多頁面應用程序。我寫了下面的代碼來實現它: routes.js import React from 'react'; import { Route } from 'react-router-dom'; import App from './App'; import {FirstPage} from './Components/FirstPage

    0熱度

    1回答

    我爲我的網站創建簡單的登錄表單。 但我有一個小問題。 當我輸入登錄名和密碼,並嘗試將其發送到服務器,我得到錯誤 Uncaught TypeError: this.props.signinUser is not a function import React, { Component } from 'react'; import { Field, reduxForm } from 'redux-f

    0熱度

    1回答

    我正在將一個應用程序(不是我寫的)從react-router v2遷移到v4。 老v2的代碼如下所示: <Route path="/configurations/:id" onEnter={loadConfiguration}> // some stuff </Route> 新的V4代碼如下所示: <Route path="/configurations/:id" componen

    0熱度

    1回答

    流式類型的libdefs是否爲react-router-native過期? 當flow荷蘭國際集團這個工作代碼,我得到: 3: import { Route, Switch, Redirect } from 'react-router-native'; ^^^^^ Named import from module `react-router-native`. This module

    1熱度

    1回答

    我用create-react-app來引導我的項目。 我加了react-router到我的反應的應用程序。在我使用serve -s build構建和投放後,當我轉到任何路徑(如http://localhost:5000/favicon.ico)時,它會將我帶到我的索引,這意味着URL更改將被react-router捕獲。但是,一旦我在那裏,如果我強制使用CMD + SHIFT + R重新加載頁面,

    1熱度

    2回答

    這是循環路由文件的代碼。在這裏我創建了一個從這裏導出到app.js的routerconfig數組。 import React, { Component } from 'react'; import { Route } from 'react-router-dom'; import routes from './routes'; class RouterConfig extends Comp

    0熱度

    1回答

    我有了下面的有效途徑一個反應/ Redux的應用: https://url/product/ https://url/product/product_id 兩條路線指向同容器組件:ProductContainer。這兩個URL之間唯一的區別是當提供產品ID時,應用程序需要從服務器獲取一些數據並預先填充某些表單。因此我需要一些基於url參數的條件提供道具的機制 我可以得到這個工作 - 但它很hack

    0熱度

    1回答

    我有一些困難,理解如何添加文檔路由與反應路由器4下面的設置中。也許uuid需要作爲通道傳遞給DocumentsPage,以便您可以返回DocumentPage ? routes = { home: '/', documents: '/documents', createDocument: '/documents/create', document: '/do

    0熱度

    1回答

    我有這樣一段代碼上時支撐不更新: class Base extends Component { changeRoute =() => { // after this, address bar gets updated but I can't see the Users // component, only Home component. this.props