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
minor #19576 [Forms] Use regular JavaScript functions in the examples (jennevdmeer)
This PR was submitted for the 7.0 branch but it was squashed and merged into the 6.4 branch instead.
Discussion
----------
[Forms] Use regular JavaScript functions in the examples
There is no real point to use `const` for functions. While it surely is an opinion, the arrow syntax should only be used for anonymous functions and it seems more confusing for newer people.
* To me and I would assume a new user `function (...) {` is instantly more clearer that we are working with a function instead of a variable
* Function has no name during debugging when using arrow syntax
* Its not shorter `function foo(e) {` vs `const foo = (e) => {`
* Hoisting is weird, specially for newer people (https://stackoverflow.com/a/33040926)
I also changed the introduction line to the delete button part to detail what the user is going to do in following code block which seemed a little unclear to me personally. If the writing is not ok, please change it.
Commits
-------
67eff99 [Forms] Use regular JavaScript functions in the examples
0 commit comments