GithubHelp home page GithubHelp logo

Comments (4)

peter-mouland avatar peter-mouland commented on August 26, 2024

<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.

ngoctranfire avatar ngoctranfire commented on August 26, 2024

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.

ngoctranfire avatar ngoctranfire commented on August 26, 2024

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.

peter-mouland avatar peter-mouland commented on August 26, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.