News for hackers. Stuff that matters.
Re:Next.js 3.0 Preview: Static Exports and Dynamic Imports by nikon on Monday May 15, 2017 @05:43PM (#14345407)
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.

Re:Next.js 3.0 Preview: Static Exports and Dynamic Imports by rase- on Monday May 15, 2017 @05:51PM (#14345456)
It'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-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

Re:Next.js 3.0 Preview: Static Exports and Dynamic Imports by Rauchg on Monday May 15, 2017 @05:52PM (#14345463)
1. We have plenty of examples with interoperation with Redux. Check out the `./examples` folder :)

We currently use global state at 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.

Re:Next.js 3.0 Preview: Static Exports and Dynamic Imports by fooey on Monday May 15, 2017 @05:47PM (#14345437)
I 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

Re:Next.js 3.0 Preview: Static Exports and Dynamic Imports by Rauchg on Monday May 15, 2017 @06:29PM (#14345731)
That'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 :)

Some examples:

- https://github.com/zeit/next.js/tree/master/examples/paramet...

- https://github.com/zeit/next.js/tree/master/examples/with-ne...

- https://github.com/zeit/next.js/tree/master/examples/with-pr...

Re:Next.js 3.0 Preview: Static Exports and Dynamic Imports by fooey on Monday May 15, 2017 @06:46PM (#14345856)
The named routes example is probably pretty close to what I was looking for. Oh well, maybe next time.
Re:Next.js 3.0 Preview: Static Exports and Dynamic Imports by atrilumen on Monday May 15, 2017 @09:37PM (#14346758)
Does next-routes work in a static build?
Re:Next.js 3.0 Preview: Static Exports and Dynamic Imports by rawnlq on Monday May 15, 2017 @06:38PM (#14345791)
Is http://mern.io/ still cool? What problems did it have that made people look for something else?
Re:Next.js 3.0 Preview: Static Exports and Dynamic Imports by matheuss on Monday May 15, 2017 @05:47PM (#14345433)
2. You can deploy it anywhere! :)