Not clear to me from the release notes if there now is an easy way to proxy to a server in development (if you for instance have a Django driven API on port 8000). This is easily done with create-react-app by just adding a line in package.json. In Next you've had to either set up and configure nginx locally or proxia via an Express server, both options that that are a bit of a hassle to set up for such a common case.
create-react-app is actually removing this feature in an upcoming release. We don't have plans to include it as a feature to Next.js as you can already implement it using a custom server. We do have an example for it: https://github.com/zeit/next.js/tree/canary/examples/with-cu...
Next.js 7
21–30 of 40 posts
Re: Next.js 7
#22Not clear to me from the release notes if there now is an easy way to proxy to a server in development (if you for instance have a Django driven API on port 8000). This is easily done with create-react-app by just adding a line in package.json. In Next you've had to either set up and configure nginx locally or proxia via an Express server, both options that that are a bit of a hassle to set up for such a common case.
Re: Next.js 7
#23Re: Next.js 7
#24Could anyone explain what Next.js is? I use React (using create-react-app), but I'm under impression that React is a JavaScript framework (like Spring is Java framework, or RoR is Ruby framework). So Next.js is a framework for a framework?
Re: Next.js 7
#25Not clear to me from the release notes if there now is an easy way to proxy to a server in development (if you for instance have a Django driven API on port 8000). This is easily done with create-react-app by just adding a line in package.json. In Next you've had to either set up and configure nginx locally or proxia via an Express server, both options that that are a bit of a hassle to set up for such a common case.
In development you'd use micro-proxy [2] and define a rules-dev.json with local mappings, and then have a package.json script to fire up that proxy for local testing.
Re: Next.js 7
#26Time and time again, the Next.js (and Zeit) team blow me away. The rate at which they release new, high-quality versions of their products is astounding, especially given how few people are working on this full time -- it's basically just Tim Neutkens, who's insane: he's constantly pushing updates, reviewing PRs, and finds time to be very active on the support channel. We use a bunch of Zeit's tools (particularly Nex…
Re: Next.js 7
#27Earlier quoted context omitted.
create-react-app is actually removing this feature in an upcoming release. We don't have plans to include it as a feature to Next.js as you can already implement it using a custom server. We do have an example for it: https://github.com/zeit/next.js/tree/canary/examples/with-cu...
Why is it being removed?
Re: Next.js 7
#28so with Next for SSR you use React as a templating engine and just send that back?
Re: Next.js 7
#29so with Next for SSR you use React as a templating engine and just send that back?
You can add an asynchronous function called .getInitialProps, which should return some props that are required for the page. On the initial load, Next will first run through getInitialProps, then render the actual component with those props. From then on, assuming you're using 'next/link' for routing, everything should work like a single page app. All of the pages except for the initial one are rendered on the client.
Re: Next.js 7
#30Could anyone explain what Next.js is? I use React (using create-react-app), but I'm under impression that React is a JavaScript framework (like Spring is Java framework, or RoR is Ruby framework). So Next.js is a framework for a framework?
> Next.js is a minimalistic framework for server-rendered React applications. https://github.com/zeit/next.js/ So a specialized framework based on another framework