1 00:00:00,660 --> 00:00:01,950 -: At the end of the last section 2 00:00:01,950 --> 00:00:04,590 we got our app component visible on the screen. 3 00:00:04,590 --> 00:00:06,390 Now you might notice that my text right here 4 00:00:06,390 --> 00:00:08,760 is a little bit larger than yours. 5 00:00:08,760 --> 00:00:10,290 Anytime I show you my browser 6 00:00:10,290 --> 00:00:12,840 I'm usually running it pretty far zoomed in. 7 00:00:12,840 --> 00:00:14,370 So yours probably looks a little bit closer 8 00:00:14,370 --> 00:00:15,600 to this right here. 9 00:00:15,600 --> 00:00:17,070 I just run it a little bit larger 10 00:00:17,070 --> 00:00:19,770 so you can see my screen more clearly. 11 00:00:19,770 --> 00:00:21,630 Now that we've got our app component visible 12 00:00:21,630 --> 00:00:23,910 let's go take care of some starting code 13 00:00:23,910 --> 00:00:26,580 for our comment box in our comment list. 14 00:00:26,580 --> 00:00:28,920 We'll get those visible inside of our app component 15 00:00:28,920 --> 00:00:29,850 and then we'll start thinking 16 00:00:29,850 --> 00:00:33,090 about how we're gonna write a test around the app. 17 00:00:33,090 --> 00:00:36,030 All right, so I'm gonna go back over to my editor 18 00:00:36,030 --> 00:00:40,200 and I'll open up my Comment Box and my Comment List files. 19 00:00:40,200 --> 00:00:42,390 We'll first take care of our comment list. 20 00:00:42,390 --> 00:00:44,700 So inside the Comment List dot js file 21 00:00:44,700 --> 00:00:47,920 I will import React from react 22 00:00:48,930 --> 00:00:52,650 and then I will export default a functional component. 23 00:00:52,650 --> 00:00:54,600 So we're going to eventually come back and make this 24 00:00:54,600 --> 00:00:57,210 into a class based component, but for right now 25 00:00:57,210 --> 00:01:01,473 we'll just get started easily with a functional component. 26 00:01:02,310 --> 00:01:04,650 So I'll put down my arrow function, and from this 27 00:01:04,650 --> 00:01:09,650 I will return a div that has the text Comment List like so. 28 00:01:12,420 --> 00:01:13,800 Then we'll do the exact same thing 29 00:01:13,800 --> 00:01:15,750 inside of our comment box. 30 00:01:15,750 --> 00:01:20,750 So inside of comment box dot js I will import react. 31 00:01:21,390 --> 00:01:26,070 Oops, capital R, from react. 32 00:01:26,070 --> 00:01:27,970 And then we'll do an export default 33 00:01:29,490 --> 00:01:32,440 with a functional component that returns a div 34 00:01:35,010 --> 00:01:39,063 with the text Comment Box like so. 35 00:01:39,990 --> 00:01:42,270 So we've now got both these components put together. 36 00:01:42,270 --> 00:01:44,850 We can now import them into the app component 37 00:01:44,850 --> 00:01:47,130 and display them inside there. 38 00:01:47,130 --> 00:01:49,980 So back inside of app dot js 39 00:01:49,980 --> 00:01:52,710 I will go up to the top of the file. 40 00:01:52,710 --> 00:01:57,710 I will import Comment Box from in the same directory 41 00:01:58,170 --> 00:02:02,010 Comment Box, and then the same thing 42 00:02:02,010 --> 00:02:06,633 or Comment List as well. 43 00:02:08,759 --> 00:02:10,620 Now inside of the app component itself 44 00:02:10,620 --> 00:02:13,080 we can replace the text that's right here 45 00:02:13,080 --> 00:02:15,480 with those two components that we just imported. 46 00:02:15,480 --> 00:02:17,640 Now I'm gonna do a little bit of reformatting here. 47 00:02:17,640 --> 00:02:19,500 I'm gonna clear everything out. 48 00:02:19,500 --> 00:02:22,170 I'll put down a set of parentheses and give myself 49 00:02:22,170 --> 00:02:25,440 just a little bit of space to write out this jsx. 50 00:02:25,440 --> 00:02:29,010 So I'll first place my div inside there. 51 00:02:29,010 --> 00:02:31,593 I'll place the comment box at the top, 52 00:02:32,700 --> 00:02:34,050 and then right underneath that 53 00:02:34,050 --> 00:02:36,633 I'll do my comment list like so. 54 00:02:37,980 --> 00:02:40,410 And then if I save the file, I should be able to go back 55 00:02:40,410 --> 00:02:43,230 over to the browser and find the text for the comment box 56 00:02:43,230 --> 00:02:45,930 and comment list visible on the screen. 57 00:02:45,930 --> 00:02:48,660 And when I flip back over, there's the reload, 58 00:02:48,660 --> 00:02:50,670 and Comment Box, and Comment List. 59 00:02:50,670 --> 00:02:51,660 Perfect. 60 00:02:51,660 --> 00:02:54,420 Okay, so we've now got this kind of initial state 61 00:02:54,420 --> 00:02:57,210 or this very early version of our application, 62 00:02:57,210 --> 00:02:59,910 but it's never too early to write a test. 63 00:02:59,910 --> 00:03:02,130 So in the next section, we're gonna take a break right now, 64 00:03:02,130 --> 00:03:03,570 and then in the next section, 65 00:03:03,570 --> 00:03:05,970 we're gonna figure out how we're gonna write our first tests 66 00:03:05,970 --> 00:03:07,680 around that app component. 67 00:03:07,680 --> 00:03:09,240 And these tests are gonna verify 68 00:03:09,240 --> 00:03:11,220 that the comment box is visible 69 00:03:11,220 --> 00:03:13,590 and the comment list is visible as well. 70 00:03:13,590 --> 00:03:16,040 So quick break and I'll see you in just a second.