4 ms·
I've always used React Router for routing. It's super flexible and plays very nicely with Redux and server-side rendering. In terms of syncing up state to views
by buchanaf 10y ago
I've always used React Router for routing. It's super flexible and plays very nicely with Redux and server-side rendering. In terms of syncing up state to views, you might want to look into 'redial' and 'react-redux', which are just higher-order components that ensure your React components can injected with the necessary state.
- pault 10y agoI eventually settled on universal-redux-router, but I'll check out redial. I have found the redux ecosystem to be generally high quality.
- ucarion 10y agoIf you're gonna use React Router and Redux, you should also check out react-router-redux: https://github.com/reactjs/react-router-redux https://github.com/reactjs/react-router-redux
- pault 10y agoThis is exactly what I'm talking about though, how many different libraries are there for routing alone? How can anyone make a reasonably informed choice between them? It's madness!
- AShedOfTools 10y agoWell, obviously, the correct choice is to use React Server and let us make all the decisions for you ;)
- pault 10y agoObligatory XKCD: https://xkcd.com/927/ https://xkcd.com/927/ ;)
- wwalser 10y agoMake a decision and run with it. Be confident enough in yourself or your team that you can pivot off that decision if it ends up being the wrong one. Often before you have enough information to make the decision at a level of precision that makes you completely comfortable. I'm coming up on a decade in web application development and I feel like this is one of the most critical skills. It also took me an embarrassingly long time to develop. I think engineering, in allowing transparency downward into each level of the "stack", engenders the opposite in it's practitioners.
- civilian 10y agoMy heuristic is: 1. Google for a blog comparing them, and eliminate any candidates with major red flags 2. Go with the one that has the most stars on it's github repo.
- crucialfelix 10y agoSo if there are no blog posts (1) then we all do 2 and then we suffer from first mover lock in.
- civilian 10y agoIDK, I'm hoping that there are enough people who don't check stars and choose a repo simply because it was the first one they found or because they think it works better with their existing code or for other reasons. And honestly there are many times where I've been that person.
- coldtea 10y ago>then we all do 2 and then we suffer from first mover lock in. I don't find JS has a "first mover lock-in" problem. If anything, it has the opposite...
- iamleppert 10y agoPicking out libraries, to some developers I work with, has become the same as shopping for a TV as Best Buy. They try to get the one with the bestest of everything, and just end up with a POS that no one wants to watch TV on. What can ya do? This is where we find ourselves today. It's a mess. But what if I told you there was another way...?
- deleted 10y ago[deleted]
- AgentME 10y agoSee if others are using it, read the documentation, read the issues list, and/or read the source code. React-router-redux only has 216 lines of code! (Not counting tests, etc.)
- pault 10y agoYes, this is basically my heuristic too. The part that's maddening is the low signal to noise ratio. It might take you six hours of googling to realize the library you need is called cthulhu-suspenders or something. You might have been able to write your own module in that time, then upload it to NPM, thus perpetuating the vicious cycle. :)
- crucialfelix 10y agoI want a website that rates packages in npm with more possibly useful heuristics: num dependencies (shallow, deep) total size of node_modules installed size (correct use of npmignore etc) code quality (McCabe, jslint, jshint) typescript/flow/ jsdoc string types etc test coverage frequency of releases documentation coverage documentation text analysis: pretentiousness, overly laconic, bro speak has a F-ing README so we could at least have some idea what the hell it is number of blog and link references number of authors reputation of authors based on their other packages open/closed issues Make the stats available so others can build indices and ranking algorithms based on these.
- ben_jones 10y agoTime since last commit, as well as average size and type of the last few commits would also be useful ensure meaningful features or bug fixes are probably being made.
- conradfr 10y agoI wanted to transitioned from browserify to webpack and test that sweet redux hot reloading. I mostly got webpack working but I never understood with certainty which hot module reloader was the current one. It seemed everything on GitHub was deprecated and any boilerplate was outdated (one month old ? Forget it). That ecosystem can be impressive but it's madness to keep up with it.