From 1bef49c72f240a58e407fc9e861a3d36c3f1f19d Mon Sep 17 00:00:00 2001 From: Alex Reardon Date: Tue, 21 Nov 2017 13:43:50 +1100 Subject: [PATCH] Adding information about requestAnimationFrame to rate limiting section. Closes #312 --- content/docs/faq-functions.md | 81 ++++++++++++++++++++++++++++++----- 1 file changed, 71 insertions(+), 10 deletions(-) diff --git a/content/docs/faq-functions.md b/content/docs/faq-functions.md index 2bc1ddad..b421f888 100644 --- a/content/docs/faq-functions.md +++ b/content/docs/faq-functions.md @@ -117,7 +117,7 @@ Make sure you aren't _calling the function_ when you pass it to the component: ```jsx render() { // Wrong: handleClick is called instead of passed as a reference! - return + return } ``` @@ -126,13 +126,13 @@ Instead, *pass the function itself* (without parens): ```jsx render() { // Correct: handleClick is passed as a reference! - return + return } ``` ### How do I pass a parameter to an event handler or callback? -You can use an arrow function to wrap around an event handler and pass parameters: +You can use an arrow function to wrap around an event handler and pass parameters: ```jsx