Last active
February 13, 2019 06:12
-
-
Save jrwebdev/a4ab39c23145ad396726df232339fa0a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const value = 10; | |
// inferred as number | |
const result = useMemo(() => value * 2, [value]); | |
const multiplier = 2; | |
// inferred as (value: number) => number | |
const multiply = useCallback((value: number) => value * multiplier, [multiplier]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment