use reading time:react一个React钩子显示可以读取多少时间的内容 源码
一个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
下载地址
用户评论