Skip to content

Commit 996508d

Browse files
authored
Formatted inline "Notes"
1 parent c4faaf6 commit 996508d

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

content/docs/faq-functions.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ class Foo extends Component {
6262
}
6363
```
6464

65-
**Note**: Using an arrow function or binding in render creates a new function each time the component renders, which may have performance implications (see below).
65+
>**Note:**
66+
>
67+
>Using `Function.prototype.bind` in render creates a new function each time the component renders, which may have performance implications; (see below).
6668
6769
#### Arrow Function in Render
6870

@@ -77,15 +79,17 @@ class Foo extends Component {
7779
}
7880
```
7981

80-
**Note**: Using an arrow function or binding in render creates a new function each time the component renders, which may have performance implications (see below).
82+
>**Note:**
83+
>
84+
>Using an arrow in render creates a new function each time the component renders, which may have performance implications; (see below).
8185
8286
### Is it OK to use arrow functions in render methods?
8387

8488
Generally speaking, yes, it is OK, and it is often the easiest way to pass parameters to callback functions.
8589

8690
If you do have performance issues, by all means, optimize!
8791

88-
### Why is my function being called every time the component re-renders?
92+
### Why is my function being called every time the component renders?
8993

9094
Make sure you aren't _calling the function_ when you pass it to the component:
9195

0 commit comments

Comments
 (0)