0.0.8 • Published 2 years ago

@minko-fe/use-nprogress v0.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

use-nprogress

WHAT IS THIS?

NProgress的进度数值,而非 UI

EXAMPLES

BASIC EXAMPLE

NProgress EXAMPLE

特点

  • 支持多实例(NProgress 是单例模式)

安装

yarn add @minko-fe/use-nprogress

使用

import { useState } from 'react';
import useNProgress from 'use-nprogress';

const Example: React.FC = () => {
  const [loading, setLoading] = useState(false);

  const { progress, isFinished, animationDuration } = useNProgress({
    isAnimating: loading,
  });
};

灵感来源

nprogress