In this video I want to mention one last rule around J OSX now making a separate video out of this because
I see this air come up so incredibly frequently with people who are first getting started with react
right now inside my component screen component.
You'll notice I've got a return statement and right after that I've got an opening parentheses.
And then inside that set of parentheses I have all of my JSA X what you see right here is the syntax
of one valid way to return a multi line.
J OS X statement so there's multiple lines right here.
One valid wage return it is by placing the return keyword and then a opening parentheses.
All of our J Sex and the closing another valid way to return a multi line statement is to write out
just the opening tag like so and then all of our J sex after it.
So in other words return statement opening tag right after and then everything else the one way that
is not valid.
And I see a lot of beginners doing this is to write out the return keyword and then place the opening
tag right after it on a new line.
This right here is interpreted by JavaScript as essentially being returned nothing like return undefined.
So our ASX is not going to be returned.
We're going to end up seeing an error message inside of our application.
As a matter of fact I'll say this right now you'll see that Yup sure enough I get a really nasty error.
Just remember anytime that you want to return a multi line ASX block it needs to either open up on the
same line as the return statement like so or you need to wrap it with a set of parentheses and the opening
parentheses has to be on the same line as the return statement.
So if I now save this error message is going to very quickly go away.
All right so let's take a pause right here.
When we come back the next video we're going to start working on our first little exercise.