according to Airbnb React style guide, It's better to use a normal function for declaring stateless component, rather than use an Arrow function.
My question is why a normal function is better?
https://github.com/airbnb/javascript/tree/master/react#class-vs-reactcreateclass-vs-stateless
Asked
Active
Viewed 391 times
1
![](../../users/profiles/6463558.webp)
slideshowp2
- 38,463
- 29
- 127
- 255
![](../../users/profiles/9393521.webp)
Samane Yaghoobi
- 127
- 3
- 7
-
5Possible duplicate of [Why does the Airbnb style guide say that relying on function name inference is discouraged?](https://stackoverflow.com/questions/37288950/why-does-the-airbnb-style-guide-say-that-relying-on-function-name-inference-is-d) – Jibin Joseph Apr 21 '19 at 16:40
-
^This will answer your question. – Jibin Joseph Apr 21 '19 at 16:46
-
@jibin-joseph Thanks a lot it's really useful, but I couldn't understand the accepted answer deeply, I need more explanation about this concept. – Samane Yaghoobi Apr 21 '19 at 17:15
-
@SamaneYaghoobi This is a full dupe indeed. I've posted an answer and tried to keep it straight and simple, https://stackoverflow.com/a/55784719/3731501 – Estus Flask Apr 21 '19 at 17:43