Git Product home page Git Product logo

Comments (2)

choonkending avatar choonkending commented on May 17, 2024

Thanks! I was trying the protected routes last night (on a branch I haven't
pushed up yet) and encountered the same error on refresh.

I'll have a look at react router server location. Thanks for that!

On Tue, 11 Aug 2015 04:45 Josh Hornby [email protected] wrote:

As mentioned here #50 (comment)
#50 (comment)
I am having issues when trying to set up an authenticated route.

You can see in the following code example
https://github.com/joshhornby/react-webpack-node/commit/a7701eaa7004c069c124ffe766da03baed7d942f

But if you go to http://localhost:3000/about directly the following error
is shown:

Error: Unhandled aborted transition! Reason: [object Object]
at Function.React.createClass.statics.handleAbort (/Users/joshuahornby/code/react-webpack-node/node_modules/react-router/lib/createRouter.js:262:55)
at Function.dispatchHandler (/Users/joshuahornby/code/react-webpack-node/node_modules/react-router/lib/createRouter.js:379:20)
at /Users/joshuahornby/code/react-webpack-node/node_modules/react-router/lib/createRouter.js:349:29
at /Users/joshuahornby/code/react-webpack-node/node_modules/react-router/lib/Transition.js:64:41
at /Users/joshuahornby/code/react-webpack-node/node_modules/react-router/lib/Transition.js:69:9
at Function.Transition.to (/Users/joshuahornby/code/react-webpack-node/node_modules/react-router/lib/Transition.js:72:15)
at /Users/joshuahornby/code/react-webpack-node/node_modules/react-router/lib/createRouter.js:348:22
at Function.Transition.from (/Users/joshuahornby/code/react-webpack-node/node_modules/react-router/lib/Transition.js:51:15)
at Function.dispatch (/Users/joshuahornby/code/react-webpack-node/node_modules/react-router/lib/createRouter.js:345:20)
at Function.refresh (/Users/joshuahornby/code/react-webpack-node/node_modules/react-router/lib/createRouter.js:396:16)
at Function.run (/Users/joshuahornby/code/react-webpack-node/node_modules/react-router/lib/createRouter.js:392:16)
at Object.runRouter as run
at renderToMarkup (/Users/joshuahornby/code/react-webpack-node/public/assets/app.server.js:132:29)
at UniversalRenderer.render (/Users/joshuahornby/code/react-webpack-node/public/assets/app.server.js:155:23)
at /Users/joshuahornby/code/react-webpack-node/server/config/routes.js:83:16
at Layer.handle as handle_request

After some discussion on Reactiflux http://www.reactiflux.com/ with
@ericclemmons https://github.com/ericclemmons I believe the issue is
due to the server render function and this package would fix this
https://github.com/ericclemmons/react-router-server-location

I think updating the server function to call the Router.create function
like
https://github.com/ericclemmons/react-router-server-location/blob/master/test/support/express.js
would fix the issue. Although not sure how this would work with Iso.

This would also help towards solving issue #47
#47 which I
believe to be a big feature that should be added to this boilerplate.

β€”
Reply to this email directly or view it on GitHub
#51.

from reactgo.

joshhornby avatar joshhornby commented on May 17, 2024

No worries @choonkending

After looking at using React Router server side I was most stuck on how to pass the local data through.

Looking forward to seeing what you come up with πŸ‘

from reactgo.

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.