3 ms·
I skeptical of benefits of declarative routing. My project got much simpler after I got rid of react-router.
by dominotw 11y ago
I skeptical of benefits of declarative routing. My project got much simpler after I got rid of react-router.
- crossman 11y agoI'm curious to hear about what gains you saw from dropping it and how you handled rendering
- albemuth 11y agoIt's a single component app and state does not change at all, in fact, we should be skeptical of React too, terrible for static HTML.
- rco8786 11y agoYes, why would anyone ever use react for static html? That's not a reason to be skeptical. That's just picking the wrong tool for the job.
- sotojuan 11y agoMaybe because it's not made for static HTML? Why not just use a templating language?
- paulddraper 11y agoWell React is a templating language. I assume you mean client-side templating.
- clessg 11y agoNo offense, but I see from some of your comments here that you don't understand what React is or why it's different from what came before.
- paulddraper 11y agoSorry for my ignorance, but could you help me by explaining why my comment was wrong? This was in response to > Why not just use a templating language? React is a templating language...or maybe more specifically has a templating language, JSX. You can even run it server side. http://reactjs.net/guides/server-side-rendering.html http://reactjs.net/guides/server-side-rendering.html The problem isn't using React in that situation per se but just that server side templating (React or not) would be a better choice. I assume that's what the commenter meant.
- deleted 11y ago[deleted]
- onewaystreet 11y ago> we should be skeptical of React too, terrible for static HTML It's easy when you use webpack and a static renderer: https://github.com/markdalgleish/static-site-generator-webpack-plugin https://github.com/markdalgleish/static-site-generator-webpa...
- albemuth 11y agoFor the downvoters, this is satire... I'm not the same poster that was 'skeptical' of react router. I have used both libraries and think they're great at what they're intended for.
- lomnakkus 11y agoCould you offer more details? Why are you skeptical? What did you observe to come to this conclusion, &c?
- Bahamut 11y agoI'm skeptical of this as well, and while I had no problems with react-router on a side project, I have misgivings with the router being coupled to JSX - IMO, this is an unnecessary coupling of what should be service logic to components.
- acjohnson55 11y agoIt's not necessary at all to use JSX to describe your route configuration. Just use POJOs instead.