Patrick Puente
Feb 10, 2022

--

Hey Connor,

Thanks for reading and I'm glad you found it helpful! The code sample for the HelloWorld component uses JavaScript's implicit return by wrapping the JSX in parentheses. Had I used curly brackets instead of parentheses then I would indeed need to explicitly add "return" before the JSX.

For more info on implicitly returning values from arrow functions:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions#function_body

https://medium.com/@bunlong/arrow-functions-return-rules-in-javascript-b63ed5f25994

--

--

Patrick Puente
Patrick Puente

Written by Patrick Puente

Musician, Taco Enthusiast, and Solution Architect

Responses (1)