5 ms·
So if you don't want to use react router what do you use for react client side routing?
by jtchang 10y ago
So if you don't want to use react router what do you use for react client side routing?
- ChrisCinelli 10y agoI na previous project we were using https://github.com/kriasoft/universal-router https://github.com/kriasoft/universal-router (or at least a previous incarnation of it). We had to write some code around it. Just to throw an alternative here.
- ChrisCinelli 10y agoA one or two years ago I met a person that was using the backbone.js instead of a flux implementation for React. They were pretty happy with it. My memories of the Backbone router are pretty good memories.
- fooey 10y agoI've used page.js with React before was was fairly happy with it
- ChrisCinelli 10y agohttps://github.com/visionmedia/page.js https://github.com/visionmedia/page.js looks pretty simple. I supposed you are not using it for the server-side rendering. Or you have a route in express for any route on page.js. Correct?
- wesleytodd 10y agoIf you are interested, that link I posted above, Nighthawk, actually is a port of Page.js for its dom and pushstate handling wrapping the Express router, so it is just as simple. Here is the bulk of the code taken from page.js: https://github.com/wesleytodd/intercept-link-clicks/blob/master/index.js https://github.com/wesleytodd/intercept-link-clicks/blob/mas...
- connorelsea 10y agoI'm really interested in a good alternative for react-router if people have so many problems with it. I was going to use this in an upcoming project, but if there is an alternative that is better, I will investigate.
- elboman 10y agoYou can always try https://github.com/ui-router/react https://github.com/ui-router/react Ui router has been the de facto router in the angular ecosystem for years. With version 1.0 the core lib became agnostic to angular.
- wesleytodd 10y agohttps://github.com/wesleytodd/nighthawk https://github.com/wesleytodd/nighthawk My team uses this, we built it in response to most of us not liking the React Router methodology, and already using Express, it seemed like a good route.
- ChrisCinelli 10y agoWhat does it add on top of https://github.com/wesleytodd/react-express-middleware https://github.com/wesleytodd/react-express-middleware ? Are you using it for server side rendering, too?
- wesleytodd 10y agoSee above: https://news.ycombinator.com/item?id=12514798 https://news.ycombinator.com/item?id=12514798