Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Nov 25 00:04
    dependabot[bot] labeled #484
  • Nov 25 00:03
    dependabot[bot] opened #484
  • Nov 25 00:03

    dependabot[bot] on npm_and_yarn

    chore(deps): bump highlight.js … (compare)

  • Nov 19 09:23
    cyberhck opened #483
  • Nov 17 11:21
    chemaxa opened #482
  • Oct 22 16:20
    nhusher edited #481
  • Oct 22 16:20
    nhusher edited #481
  • Oct 22 16:20
    nhusher opened #481
  • Oct 22 16:16
    nhusher opened #480
  • Oct 20 13:01
    garronej closed #479
  • Oct 18 14:23
    garronej opened #479
  • Oct 09 15:08
    AfanasiyZaharov opened #478
  • Oct 09 07:09
    cameronbraid closed #431
  • Oct 06 09:16
    kyorkston opened #477
  • Oct 05 22:16
    aleksandrlat closed #394
  • Sep 30 04:55
    cyberhck opened #476
  • Sep 25 14:18
    grumd opened #475
  • Sep 15 15:13
    KycKyc opened #474
  • Sep 10 17:51
    mihanizm56 opened #473
  • Sep 09 04:18
    dependabot[bot] labeled #472
Vasiliy Yorkin
there is a broken link here: https://github.com/router5/redux-router5#with-react, you can use withContext() from recompose <<
grats on the 1.0.0 release @troch ;)
Dave Irvine
Hi @troch. Got a quick question, perhaps I am massively misunderstanding what is going on here, but you can correct me if so :) With the following code I get the console output line twice:
                        var router = new Router5() 
                                .setOption('useHash', true)
                                .setOption('defaultRoute', 'home') 
                                .addNode('home', '/home')

                        router.addRouteListener('home', function (toState, fromState) {
                                console.log('home route listener hit');

both times, fromState is null
So I don't think I'm actually hitting the route twice, I think the listener is just firing twice. Although I dont know why.
Dave Irvine
Hmm although on the 2nd hit, if I look in the call stack I can see navigateToDefault twice
Thomas Roch
@dave-irvine I'll check that out
@vyorkin thanks, link fixed
@Nickman87 thanks :)
Vasiliy Yorkin
@troch I’m playing around with redux & friends and discovered this thing: https://github.com/acdlite/flux-standard-action
its seems that there is a covention about action structure
just don’t if its official enough to folow
as I can see redux-router5 doesn't follow this conventions (R5_NAVIGATE, R5_TRANSITION_SUCCESS, etc)
Thomas Roch
No doesn't follow it but there is no reason why it couldn't be the case
Vasiliy Yorkin
ok, I don’t know if its important or not, just wanted to let you know
Thomas Roch
yes, I am aware of FSA. I'll include it soon.
Vasiliy Yorkin
there is one more issue with redux-devtools concerning undo functionality (history doesn’t change when I undo/redo R5 actions), I’m going to try to reproduce in router5-examples/apps/react-redux
Thomas Roch
I definitely need to run more checks around this, and get redux-router5 in a more mature state. History can't be rewind though, and there is also be the problem of rewinding part of of a route change transition actions and not all.
@/all 1.1.0 was released today BTW. It adds a feature for passing "additional" arguments to canActivate and canDeactivate functions. No breaking change really, that feature is added for supporting redux-router5. So if redux-router5 is used, canActivate functions receive your store object first: http://router5.github.io/docs/preventing-navigation.html#additional-arguments
Adam Gołąb
import { actionTypes } from 'redux-router5';
import transitionPath from 'router5.transition-path';

const onRouteActivateMiddleware = routes => (router, dependencies) => (toState) => {
    const { toActivate } = transitionPath(action.payload.route, action.payload.previousRoute);

    toActivate.forEach(segment => {
        const routeSegment = routes.find(r => r.name === segment);
        if (routeSegment && routeSegment.onActivate) {
@/all I have encountered following problem. action is not defined. Code is from docs. Should I import something else in this middleware to get loading async data with redux working?
Adam Gołąb
I found what's wrong. In documentation http://router5.github.io/docs/async-data.html instead of action.payload.route should be toState, and instead of action.payload.previousRoute should be fromState passed as second parameters.
Alexander Torn
Hello there. May i ask a question here how to implement transition node functionality in my situation?
Juan Soto
Is there a way to use persistentParamsPlugin with dynamic query params? like ${user.id}_stuff_
Juan Soto
Issue: router5/router5#122
thank god this channel exist
i am reading the docs and I am a bit confused
"allow not found" part
import { constants } from 'router5';

    name: constants.UNKNOWN_ROUTE
    params: { path: '/route-not-found' },
    path: '/route-not-found'
how is this a valid code snippet?
just some random object floating around somewhere
(copy pasted from the doc)
Michael Pardo
Hey, a couple questions: 1) is this the best place to chat about router5? 2) I’m thinking of porting router5 to Java/Kotlin; is there currently an effort to do this?
Thomas Roch
@pardonut there is no effort I know of to port router5 in Java/Kotlin
Tanawat Tassana
Hi @troch I found the issue about createRouteNodeSelector in my project but not really sure it's your intention and I misunderstand sth or not.
let say I have state a.b so I create node selector at a but when I go to a.b, the route that return from selector(state) never change, while selector at '' (root) works well.
I look at the code here: https://github.com/router5/router5/blob/master/packages/redux-router5/modules/lib/routeNodeSelector.js
and found that at line 19 the else is missing. So I hack the code in my node_modules put that else block into dist directory then it works as expected.
I want to fire the issue I found but I need to have it works ASAP. What do you think it is the best way I should do? and if I am wrong please let me know. Thanks.
Thomas Roch
@codewithcats route node selectors update when they are concerned by a transition. If you tell me you have a route node selector a which doesn't update when you go to a.b, well it depends what the previous route is. Without components it's also difficult to know if there is a bug or if you've not connected your components well.
Jean-Pascal Hövel
Hello everybody. I'm having trouble to understand the real sense of nodeName on RouteNode for the react integration. If I switch to another parent node, my old render just stays since the intersection is empty. So when to use RouteNode?
John Cudd
How do I deal with static assets?
Dmitry Kharitonov
Hey! After upgrade to v7 packages VS Code tells me that the react-router5 package has not TypeScript typings. All good with router5 and router5-plugin-browser packages, only react-router5. Is this known issue? I've tried to clean up node_modules and package-lock.json.
Dmitry Kharitonov
Ok, I found the problem. PR submitted router5/router5#387
Hi everyone, is anyone using router5 with Svelte?
Can Router5 be used to implement State Machines and Charts? I'm looking at David Khourshid's Xstate libray and was wondering if Router5 could replace it as a full route/state solution, or if I should really combine the two?
Apparently, Xstate can be a full replacement for Redux. Although, this isn't really that clear from the Xstate Docs, as David presents the library very differently to how Redux is presented/promoted.
Peter Zhang
I use MobX + Router5 for state management and routing. I think they are great combination to implement a state machine.
Pipatpol Tanavongchinda
Hi, Could you please export resolve.ts. I would like to use it for reconstruct data that fetch from api and inject to MobX store on the Client Side Rendering.
Vojtěch Dobeš
Hello, I
Vojtěch Dobeš
Hello, I have a question about browserPlugin. It says “forceDeactivate” shouldn’t be set to false. What is exactly the reason for that and what are the possible problems occurring when switched to false?