1. 首页
  2. 数据库
  3. 其它
  4. use reading time:react一个React钩子显示可以读取多少时间的内容 源码

use reading time:react一个React钩子显示可以读取多少时间的内容 源码

上传者: 2021-04-04 10:41:09上传 ZIP文件 398KB 热度 5次
一个react钩子,显示可以读取多少时间的内容 安装 使用纱线: yarn add use-reading-time 使用NPM: npm install --save use-reading-time 用法 import React , { useRef } from 'react' import Post from './post' import useReadingTime from 'use-reading-time' const Example = ( ) => { const post = useRef ( ) const { readingTime , wordsCount } = useReadingTime ( post ) return ( < div> { readingTime } min • { wordsCount } wo
下载地址
用户评论