You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apps/components_guide_web/lib/components_guide_web/templates/react_typescript/tips.html.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -95,7 +95,7 @@ function Button({
95
95
96
96
There’s not much difference, but I prefer the latter as:
97
97
- The `function` keyword clearly says *I am a function* whereas the `=>` whispers.
98
-
- Using function adds a [`name` property](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name), which is both useful for debugging and is also used in presenting in [React Developer Tools](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en). Arrow functions need an additional [babel plugin]((https://babeljs.io/docs/en/babel-plugin-transform-function-name) to make this happen.
98
+
- Using function adds a [`name` property](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name), which is both useful for debugging and is also used in presenting in [React Developer Tools](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en). Arrow functions need an additional [babel plugin](https://babeljs.io/docs/en/babel-plugin-transform-function-name) to make this happen.
99
99
- We don’t need to decide between implicit and explicit returns — we always need to write `return` which makes refactoring quicker as we can quickly add new statements.
100
100
- Just because arrow functions are newer doesn’t mean we have to use them all the time.
0 commit comments