1 00:00:00,890 --> 00:00:05,960 In this video I want to mention one last rule around J OSX now making a separate video out of this because 2 00:00:05,960 --> 00:00:10,760 I see this air come up so incredibly frequently with people who are first getting started with react 3 00:00:11,450 --> 00:00:13,470 right now inside my component screen component. 4 00:00:13,490 --> 00:00:18,190 You'll notice I've got a return statement and right after that I've got an opening parentheses. 5 00:00:18,190 --> 00:00:23,870 And then inside that set of parentheses I have all of my JSA X what you see right here is the syntax 6 00:00:23,900 --> 00:00:27,130 of one valid way to return a multi line. 7 00:00:27,170 --> 00:00:30,020 J OS X statement so there's multiple lines right here. 8 00:00:30,080 --> 00:00:35,930 One valid wage return it is by placing the return keyword and then a opening parentheses. 9 00:00:36,080 --> 00:00:42,160 All of our J Sex and the closing another valid way to return a multi line statement is to write out 10 00:00:42,760 --> 00:00:47,810 just the opening tag like so and then all of our J sex after it. 11 00:00:48,260 --> 00:00:53,960 So in other words return statement opening tag right after and then everything else the one way that 12 00:00:53,960 --> 00:00:55,020 is not valid. 13 00:00:55,040 --> 00:00:59,840 And I see a lot of beginners doing this is to write out the return keyword and then place the opening 14 00:00:59,840 --> 00:01:03,340 tag right after it on a new line. 15 00:01:03,350 --> 00:01:09,350 This right here is interpreted by JavaScript as essentially being returned nothing like return undefined. 16 00:01:09,350 --> 00:01:11,380 So our ASX is not going to be returned. 17 00:01:11,420 --> 00:01:14,310 We're going to end up seeing an error message inside of our application. 18 00:01:14,450 --> 00:01:19,310 As a matter of fact I'll say this right now you'll see that Yup sure enough I get a really nasty error. 19 00:01:19,550 --> 00:01:24,800 Just remember anytime that you want to return a multi line ASX block it needs to either open up on the 20 00:01:24,800 --> 00:01:31,340 same line as the return statement like so or you need to wrap it with a set of parentheses and the opening 21 00:01:31,340 --> 00:01:35,670 parentheses has to be on the same line as the return statement. 22 00:01:35,780 --> 00:01:39,700 So if I now save this error message is going to very quickly go away. 23 00:01:39,950 --> 00:01:41,570 All right so let's take a pause right here. 24 00:01:41,570 --> 00:01:45,110 When we come back the next video we're going to start working on our first little exercise.