File size: 323 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { FunctionComponent } from 'react';
import { TimeoutMS } from 'calypso/types';
import { useInterval } from './use-interval';

interface Props {
	onTick: () => void;
	period: TimeoutMS;
}

export const Interval: FunctionComponent< Props > = ( props ) => {
	useInterval( props.onTick, props.period );
	return null;
};