Re:React Server
by buchanaf on Thursday August 11, 2016 @06:34PM
(#12272129)
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.
[ Parent
| on HN ]
If you're gonna use React Router and Redux, you should also check out react-router-redux:
This 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!
Re:React Server
by crucialfelix on Friday August 12, 2016 @04:12AM
(#12274045)
I 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.Time 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.
See 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.)
Yes, 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. :)
My 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.
Re:React Server
by crucialfelix on Friday August 12, 2016 @04:13AM
(#12274047)
So if there are no blog posts (1) then we all do 2 and then we suffer from first mover lock in.
>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...
IDK, 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.
Make 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.
I 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.
Re:React Server
by iamleppert on Thursday August 11, 2016 @10:16PM
(#12273047)
Picking 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...?
Re:React Server
by AShedOfTools on Thursday August 11, 2016 @08:24PM
(#12272718)
Well, obviously, the correct choice is to use React Server and let us make all the decisions for you ;)
Obligatory XKCD: https://xkcd.com/927/
;)