rrrhys.com - Rhys Williams -

Example domain paragraphs

A simple hook to poll a server for updates every n milliseconds, and remove itself on unmount.

usePollingUpdate will call pollingFunction every interval milliseconds, and clean up after itself.

Posted by rrrhys January 27, 2022 January 27, 2022 Posted in Uncategorized UseCallback Debounce const debouncedOnChangeText = useCallback(_.debounce(onChangeText, 150), []) Calls the onChangeText handler only every 150ms, without recreating it over and over.

Links to rrrhys.com (1)