Comments (4)
<RouterContext {...renderProps} />
Is where this history is passed (comes with renderProps
).
I'm not sure what the error is you are trying to describe. Are you able to give some steps to reproduce it to help me out?
from react-lego.
I'm currently not at my computer right now but if you take a look at it for example I think you called makeRoutes(store). However, your makeRoutes function currently doesn't take in any Params. Also, there was another issue and it seems to be happening on just a branch of mine. It might just be an error of mine but I can confirm later today
from react-lego.
Okay, let me try to explain the problem that I am seeing. I actually looked at a few guides on how to set up router context on the server side. It seems that, for some reason, that your implementation differs quite a bit from the implementation I've seen from other repos. Firstly, I noticed that a lot of the other repos, noticeably, this repo:
https://github.com/erikras/react-redux-universal-hot-example/blob/master/src/server.js. They actually grab the history, and then make sure its synced with the store before they pass it into match({}). Also, I noticed how there configureStore.js is much different from ours.
For example, referring to this project again: https://github.com/erikras/react-redux-universal-hot-example/blob/master/src/redux/create.js
They actually pass in the history to the store. We don't have any of this in our store at all. It seems each time we grab our routes, it is a brand new set of routes, with no prior history information.
Not sure if that made too much sense. I'm still kind of new to this, but just from seeing these implementations and comparing it with yours, it seems kind of off. I tried to use yours and it didn't work out so well for me in including it into my own project. I ended up with getting a lot hash routes when I wanted them to be browserHistory style routes.
from react-lego.
I've not had any problems with hash-history instead of browser-history. I haven't integrated `react-router-redux' (as they have in the example project); do you also use this?
I think react-router-redux and the passing around of the history into more places, is to enable time-travel ability (to replay user actions including route changes). I've not tried to implement this yet, but the prospect of being able to debug errors in this way is intriguing!
It does sound like a potential new branch (off the redux-dev-tools branch) to enable time-travel
...
from react-lego.
Related Issues (20)
- add redux-rhl branch HOT 1
- add react-router-4-rhl branch HOT 1
- Error trying to do run start:dev on svg-isomorphic-loader branch HOT 1
- Hot-reload branch does not work as expected HOT 5
- enable time-travel HOT 1
- [react-hot-loader] You cannot change <Router routes> HOT 1
- "webpack-dev-server": "^1.14.1", in Webpack v2 HRM HOT 5
- Firebase Branch
- add mobx branch
- Enable es6 syntax in server code. HOT 3
- add react-toolkit branch
- Compilation fails for svg branch HOT 8
- rr4 - Memory Router causes activeClassname not being set on server
- add promised middleware to koa-app branch HOT 1
- Suggestion: Performance comparisons HOT 2
- koa react app 404 HOT 1
- Fetching server-side data with async routes HOT 8
- tidy up & stream-line react-lego HOT 1
- create react-lego for 2018
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-lego.