react-interval-rerenderer
v1.0.5
Published
A React component for rerendering elements at set intervals.
Downloads
5
Maintainers
Readme
react-interval-rerenderer
A React component for rerendering elements at set intervals.
Similar to react-interval-rerender
but has TypeScript definitions, different syntax, and a smaller bundle size.
Installation
yarn add react-interval-rerenderer
Usage
import IntervalRerenderer from 'react-interval-rerenderer';
const Time: React.FC = () => (
<IntervalRerenderer duration={1000} render={Date.now} />
);
Props
duration: number
The duration of rerender intervals in milliseconds.
render: () => React.ReactNode
Returns the content to be rendered.