Reactgo: Spike React Router v 4 - the API is looking amazing.

Created on 10 Feb 2017  ·  10Comments  ·  Source: reactGo/reactGo

Why

Explore RR4 - it's API might simplify our code + give us more control.

https://reacttraining.com/react-router/

Most helpful comment

This would be super nice! Allow me to share my experience when I attempted to move to rr4 in a project built on this boilerplate. The problems I faced was.

  1. The lack of code splitting hooks.
  2. Troubles getting HMR to work

For point 2, I am pretty sure it was just some error on my part (didn't really try that much), because there are HMR examples out there for rr4, but for point 1 there was, for me, no acceptable solution at the time (~1 month ago). In rr2/rr3, one would use getComponent, but there is no equivalent in rr4. There are user-space solutions to this, but it comes with the additional baggage of maintenance etc, so I chosed to not port at that point.

All 10 comments

This would be super nice! Allow me to share my experience when I attempted to move to rr4 in a project built on this boilerplate. The problems I faced was.

  1. The lack of code splitting hooks.
  2. Troubles getting HMR to work

For point 2, I am pretty sure it was just some error on my part (didn't really try that much), because there are HMR examples out there for rr4, but for point 1 there was, for me, no acceptable solution at the time (~1 month ago). In rr2/rr3, one would use getComponent, but there is no equivalent in rr4. There are user-space solutions to this, but it comes with the additional baggage of maintenance etc, so I chosed to not port at that point.

Just came across this blog post on some of the challenges (and solutions!) for SSR in RR4. Might be of some use: https://ebaytech.berlin/universal-web-apps-with-react-router-4-15002bb30ccb#.ttmt1msh0

react-router@4 and react-router-redux@5 is out (react-router-redux is @5.0.0-alpha not though) but documentation of react-router@4 is not complete yet.
If it is complete and official version of react-router-redux@5 comes out, I'll try to update this repository to react-router@4

@ZeroCho How about replace react-router-redux (which is still in alpha) with connected-react-router ? Because there isn't a roadmap for react-router-redux (maybe I am wrong), one month past, and it's still in alpha for now

You can change it back to react-router-redux once a stable version is released.

okay i'll give it a try




      1. 오전 11:56에 "gudh" notifications@github.com님이 작성:



@ZeroCho https://github.com/ZeroCho How about replace
react-router-redux (which is still in alpha) with connected-react-router
https://github.com/supasate/connected-react-router ? Because there
isn't a roadmap for react-router-redux, a month past, and it's still in
alpha

You can change it back react-router-redux once a stable version is
released.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/reactGo/reactGo/issues/827#issuecomment-294073874,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AKdG7B3Cbn_PNv60ymtxlcmnz_S2ac-lks5rvuBSgaJpZM4L8-Gx
.

@gudh Hmm. Connected-react-router seems it does not support SSR.

@ZeroCho on server side use <StaticRouter>

I heard good stuff about rr4. Hehe. If react router redux doesn't support
it, I suggest we remove it as a dependency altogether!!

On Thu, 25 May 2017 06:57 Ruslan Kyba notifications@github.com wrote:

@ZeroCho https://github.com/zerocho on server side use


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/reactGo/reactGo/issues/827#issuecomment-303849685,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADnMbcMm65xrbuAjA7tsWkR2mvY1rDLFks5r9JnRgaJpZM4L8-Gx
.

@kybarg I know. But StaticRouter is just for SSR. We also wanted to split code, which is the toughest part. Even react router team themselves gave up...

978

Was this page helpful?
0 / 5 - 0 ratings

Related issues

azamatsmith picture azamatsmith  ·  6Comments

kenjim83 picture kenjim83  ·  8Comments

evansteelepdx picture evansteelepdx  ·  3Comments

zacharybrady picture zacharybrady  ·  4Comments

choonkending picture choonkending  ·  8Comments