menu

Next.js

A place to chat about Next.js and answer questions. For all other ZEIT products, check this out.

Channels
Team
Posts
Members
Info
Hunter·14m

Prevent getInitialProps from firing with Router.replace from another page.

I would like to prevent getInitialProps from executing when navigation takes place from another page. From the Next.js documentation "Shallow routing works only for same page URL changes." so using something like …

thumbsup
0
message-simple
0

React Hooks + Portal: document not defined

Hi, I'm trying to create a portal using Hooks. I checked this example of how to use Portals with NextJS. https://github.com/zeit/next.js/tree/85769c3d3296cdcddc0fb36f05058c8e451ca57f/examples/with-portals …

thumbsup
0
message-simple
0

Mui + Styled component

Hi, I'm trying to make next js with styled component + mui At first I have looked …

thumbsup
0
message-simple
1

"Internal server error" - When trying to connect next js with apollo client

Hi, I'm trying to connect my next js project with my graphql endpoint. And following official "with-apollo-auth" example to connect through apollo-boost. But I'm getting this error message: TypeError: Cannot set property default of #<Object> which has only a getter …

thumbsup
0
message-simple
0

gatsby-image solution for NextJS

Is there an alternative for gatsby-image in NextJS or CRA in general.

thumbsup
0
message-simple
2

Import external scss file

i have some scss file what is the best way to import and how can i import. do i need to import it on every page? is there any way to import some where for one time. and for next.config.js module.exports = withPlugins([ [withCSS, { …

thumbsup
0
message-simple
3

Using Next and Material UI

Hi there! I just published a blog post about Next and Material UI https://dunglas.fr/2019/05/using-next-js-and-material-ui/

thumbsup
1
message-simple
0

Some Links cause page to reload

I'm having some trouble with <Link>. In a few cases clicking on links, all with a specific route, causes my page to reload. The Link tag that causes the page to reload is set up like this: While one that works is set up like this: …

thumbsup
0
message-simple
0

Prop `className` did not match.

I get this error when i use activeClassName in a custom Link I'm not sure how to fix it Nav.js …

thumbsup
0
message-simple
6
keethu·18h

getInitialProps and Shared Context

I have two pages (home page and movie page), and both fetches movie data in getInitialProps. I would like avoid fetching twice. I don't want to use redux, so I thought of creating a context provider in _app component. But how can I check if the context has data inside static…

thumbsup
2
message-simple
2