All Projects → sergiodxa → Next Nprogress

sergiodxa / Next Nprogress

Licence: mit
Next.js HOC to integrate NProgress inside your app

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Next Nprogress

React Nprogress
⌛️ A React primitive for building slim progress bars.
Stars: ✭ 173 (+19.31%)
Mutual labels:  higher-order-component, hoc, progress-bar
react-app-loader
Production ready library for handling Microfrontends
Stars: ✭ 75 (-48.28%)
Mutual labels:  higher-order-component, hoc
Next Ga
Next.js HOC to integrate Google Analytics on every page change
Stars: ✭ 228 (+57.24%)
Mutual labels:  nextjs, hoc
react-animation-frame
A React higher-order component that invokes a callback in a wrapped component via requestAnimationFrame
Stars: ✭ 47 (-67.59%)
Mutual labels:  higher-order-component, hoc
Neoform
✅ React form state management and validation
Stars: ✭ 162 (+11.72%)
Mutual labels:  higher-order-component, hoc
React With Direction
Components to provide and consume RTL or LTR direction in React
Stars: ✭ 176 (+21.38%)
Mutual labels:  higher-order-component, hoc
react-table-hoc-draggable-columns
ReactTable HOC for draggable columns
Stars: ✭ 27 (-81.38%)
Mutual labels:  higher-order-component, hoc
Recompact
⚛ A set of React higher-order components utilities. Drop-in replacement for recompose.
Stars: ✭ 419 (+188.97%)
Mutual labels:  higher-order-component, hoc
next-utils
🥩 🍳 A set of Next.js HoC utilities to make your life easier
Stars: ✭ 30 (-79.31%)
Mutual labels:  nextjs, hoc
addhoc
Handy little helper to create proper React HOC functions complete with hoisted statics and forwarded refs
Stars: ✭ 40 (-72.41%)
Mutual labels:  higher-order-component, hoc
Hocs
🍱 Higher-Order Components for React
Stars: ✭ 1,784 (+1130.34%)
Mutual labels:  higher-order-component, hoc
Incompose
A inferno utility belt for function components and higher-order components
Stars: ✭ 76 (-47.59%)
Mutual labels:  higher-order-component, hoc
rrx
⚛️ Minimal React router using higher order components
Stars: ✭ 69 (-52.41%)
Mutual labels:  higher-order-component, hoc
react-drip-form
☕ HoC based React forms state manager, Support for validation and normalization.
Stars: ✭ 66 (-54.48%)
Mutual labels:  higher-order-component, hoc
React Bps
🔱 Create breakpoints to your component props
Stars: ✭ 64 (-55.86%)
Mutual labels:  higher-order-component, hoc
Flagged
Feature Flags for React made easy with hooks, HOC and Render Props
Stars: ✭ 97 (-33.1%)
Mutual labels:  higher-order-component, hoc
Egg React Ssr
最小而美的Egg + React + SSR 服务端渲染应用骨架,同时支持JS和TS
Stars: ✭ 1,837 (+1166.9%)
Mutual labels:  nextjs
Paco
personal website and blog
Stars: ✭ 136 (-6.21%)
Mutual labels:  nextjs
Nextjs Ts
Opinionated Next JS project boilerplate with TypeScript and Redux
Stars: ✭ 134 (-7.59%)
Mutual labels:  nextjs
Nextjs Vercel Firebase
Next.js app using API routes to connect with Firestore.
Stars: ✭ 133 (-8.28%)
Mutual labels:  nextjs

next-nprogress

Next.js HOC to integrate NProgress inside your app.

This is configured to run only after a delay of (default) 300ms. This means if the page change takes too long it will render the progress bar, but if it's fast enough it will avoid rendering it.

Installation

yarn add next-nprogress

Usage

Component

Import it inside your pages/_app.js;

import NProgress from "next-nprogress/component";

Render the component in your custom App container:

<NProgress />

That's it. Now NProgress will work automatically and render the correct styles using styled-jsx.

Higher order component

Import it inside your pages/_app.js;

import withNProgress from "next-nprogress";

Wrap your custom App container with it

const msDelay = 1000; // default is 300
export default withNProgress(msDelay)(MyApp);

Internally it will use the NProgress component and render it alongside your application.

Advanced Config

You can configure further configure NProgress using its configuration options.

Configure the component:

<NProgress
  color="#29d"
  options={{ trickleSpeed: 50 }}
  showAfterMs={300}
  spinner
/>

Configure the HOC:

const msDelay = 200;
const options = { trickleSpeed: 50 };
export default withNProgress(msDelay, options)(MyApp);
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].