Next.js: How do I get the cool loader bar like in the Zeit blog?

Created on 12 Mar 2017  路  6Comments  路  Source: vercel/next.js

It looks like Pace (or NProgress) ! So cool man!
But there isn't any isomorphic loading bar component out in the React ecosystem. Yes, I tried to make one, but it just feels un-natural, and I couldn't figure out how to place loading bar during AJAX/REST request...馃槀

Most helpful comment

You need to use a HOC. Can check my example app: https://github.com/relatenow/relate

All 6 comments

@rauchg has mentioned he is going to do a write-up of how this was achieved soon. Closing this as duplicate of #88

锛爏edubois Oh yeah!馃槀 I'm too lazy to find it out.

But I couldn't make it shared across all pages. I've tried putting the router code on the pages/_document.js, but it didn't do anything.

Because that thing was rendered in server

I mean, sure I can import them all in each page individually, but then, it wasn't automated.

You need to use a HOC. Can check my example app: https://github.com/relatenow/relate

@sedubois where should i look in your app for the proper example 馃槃 ?

Was this page helpful?
0 / 5 - 0 ratings