3 ms·
I'm in the market for a good React Universal boilerplate and am considering Next.js for my next project... A couple of things: 1) Why do you not use React Rou
by nikon 9y ago
I'm in the market for a good React Universal boilerplate and am considering Next.js for my next project...
A couple of things:
1) Why do you not use React Router? How does your own router play with Redux?
2) Is it possible to strip out now.sh? I appreciate it's how you make money but I want to deploy to my own infrastructure.
- matheuss 9y ago2. You can deploy it anywhere! :)
- fooey 9y agoI tried to do a project with next.js but their router was just too awkward and limiting. Unless you're doing straight 1:1 route to code, you're basically on your own. https://github.com/zeit/next.js#custom-server-and-routing https://github.com/zeit/next.js#custom-server-and-routing
- deleted 9y ago[deleted]
- Rauchg 9y agoThat's the opposite of what that page is trying to explain. We'll take a look at the wording in case it's confusing. tl;DR: You can do any sort of routing! We use a /:org/:project scheme similar to GitHub at https://zeit.co https://zeit.co :) Some examples: - https://github.com/zeit/next.js/tree/master/examples/parameterized-routing https://github.com/zeit/next.js/tree/master/examples/paramet... - https://github.com/zeit/next.js/tree/master/examples/with-next-routes https://github.com/zeit/next.js/tree/master/examples/with-ne... - https://github.com/zeit/next.js/tree/master/examples/with-pretty-url-routing https://github.com/zeit/next.js/tree/master/examples/with-pr...
- rase- 9y agoIt's more of a framework than a boilerplate solution, but highly recommend checking it out! To answer your questions: 1) Because the router in next.js embeds really well into the model of pages, prefetching, etc. while still keeping the mechanisms simple, here's how to use with redux: https://github.com/zeit/next.js/tree/master/examples/with-redux https://github.com/zeit/next.js/tree/master/examples/with-re... 2) now.sh is in no way mandatory. To deploy anywhere, `next build` and `next start` will run the node.js server, so you're free to deploy it anywhere you'd like: https://github.com/zeit/next.js#production-deployment https://github.com/zeit/next.js#production-deployment
- Rauchg 9y ago1. We have plenty of examples with interoperation with Redux. Check out the `./examples` folder :) We currently use global state at https://zeit.co https://zeit.co to keep the authenticated user in memory without re-checking for every page transition. You can think of Next.js's Router as a "strict subset" of RR. Definitely possible for us to simplify our codebase by switching to RR in the future. 2. Nothing about this framework is dependent on now.sh. We, however, did design now.sh to make deployment of applications as this as easy, fast and scalable as possible with collaboration in mind.
- rawnlq 9y agoIs http://mern.io/ http://mern.io/ still cool? What problems did it have that made people look for something else?