I am using React + Redux, and after reading about react-router-redux and redux-router, and after reading Dan Abramov's answer, I decided to use "vanilla" react-router (I don't care about time travel etc. at this point).
The only open question left…
With react-router-redux, it appears as though the only way to get routing information is through props only. Is this right?
Here's roughly what I am doing in my app right now:
I'm using react-router-redux (https://github.com/ReactTraining/react-router/tree/master/packages/react-router-redux)
installed with
npm install --save react-router-redux@next
implemented like so:
I have followed the react-router-redux example on the github page, but when I try to pass {this.props.children} to the IndexRoute and I try to log it, it's undefined.
The only error I get through the console is Warning: You should not use
I'm struggling a bit with react-router 2.x configuration, specifically app basename.
I've an application which may have different base root throughout its lifecycle. For instance:
/ in development
/users in production
/account in production after…
I want to fire an action down in my component. This is a presentation component and need not be redux aware. Router implementation is done using react-router-redux.
main.js:
let store = createStore(rootReducer)
const history =…
I'm working toward having my React/Redux app update the URL based on actions. I've done quite a bit of looking around. I thought I had a handle on it, but obviously I'm missing something. I have other reducers that respond correctly.
Currently, I'm…
I'm trying to modify the example code of react-router-redux.
https://github.com/rackt/react-router-redux/blob/master/examples/basic/components/Home.js
this is my Home.js
class Home extends Component {
onSubmit(props) {
…
I have an app using react @0.14, redux @3.05, react-router @1.0.3, and redux-simple-router @2.0.2. I'm trying to configure onEnter transitions for some of my routes based on store state. The transition hooks successfully fire and push new state to…
I'm trying to use react-router 2.0 with redux-simple-router but I can't get it to work with query parsing. This is what I got from the docs:
const appHistory = useRouterHistory({
parseQueryString: parse,
stringifyQueryString:…
I am using react, redux and react-redux-router. When I run an application I get an error. I do not understand what it has to do with the render function of react in my App.js. It seems to me that problem is lying somewhere else in the code.
The…
I am new with React and I have setup my React project with Facebook's create-react-app. Here are the core files:
Index.js
import React from 'react';
import ReactDOM, { render } from 'react-dom';
import { BrowserRouter as Router } from…
I am trying to update history in react when the user navigates from one page/route to another. But confused about what method I should use to achieve this and why?
import { browserHistory } from 'react-router'
browserHistory.push('/bag')
OR
import…
I am starting to learn typescript and the is a behaviour that I don't understand.
I got this error:
Type 'ComponentClass<{}>' is not assignable to type 'StatelessComponent> | ComponentClass