davidhu2000 / youtube_desktop

The desktop Youtube Application built using Electron. (In development)
https://www.davidhu.io/youtube_desktop/
MIT License
140 stars 24 forks source link

upgrade to react-router 4? #47

Open davidhu2000 opened 7 years ago

davidhu2000 commented 7 years ago

So React Router 4 is the current stable version, there seems to be a ton of changes. For example, hashHistory is no longer defined. But there seem to be some good features.

I want to ask you guys if you think we should migrate from v3 to v4? I think we probably eventually have to do it, but if it's done earlier, it might be better?

What do you think?

Here is the doc for v4 https://reacttraining.com/react-router/

@nguyenkevin16 @asherman-ca @rlee0525 @cjudge1337

cjudge1337 commented 7 years ago

I don't see why not. It looks like all we would really need to do at this point is change hashHistory to history everywhere. Also, we could potentially speed the app up a little by switching to <MemoryRouter> from <Router>.

davidhu2000 commented 7 years ago

What is the difference between <MemoryRouter> and <Router> ? @cjudge1337

cjudge1337 commented 7 years ago

Just going off the description they had for it right now:

A <Router> that keeps the history of your “URL” in memory (does not read or write to the address bar). Useful in tests and non-browser environments like React Native.

I don't know if it would actually help but since we are doing a desktop app this seems like the kind of environment it would be useful in.

davidhu2000 commented 7 years ago

are you interested in looking into possible migrating our app to v4?

Or at least to see how feasible it is to do it? Or whether it is worth the effort? @cjudge1337

cjudge1337 commented 7 years ago

Sure I can take a look.