Loading
Current section: app 14 exercises
lesson

Simple Apps Without package.json - Problem

Explore the simplest app type that consists of just an index file. Learn how HTML, JavaScript, and CSS files are automatically loaded, and how tests run automatically when you open the Test tab.

Loading lesson

Transcript

00:00 There's one other kind of app that you're going to be working in. Let's go ahead and set the Playground. And now we do have a problem and solution. We're getting something rendered in here, but it is not a start app. In fact, it's already started.

00:11 We've got a button here. Click me. What is that? OK. We'll click that.

00:15 OK, to do. This is actually your exercise. So if we take a look at our playground here, we no longer have that greet module. We don't even have a package JSON. Instead, we simply have an index.js, and we have this readme here.

00:28 So with these kinds of apps, you can have an index.html, index.js, index.ts, index.css. And you can actually have multiple modules and imports and all of that stuff. But the basic idea is that it's just a really, really simple thing. We just need some JavaScript that shows up in the browser. That's this type of app.

00:45 And so yeah, there's not a whole lot going on here with this one. It's all handled kind of magically for you. You can open this up as a separate tab, and this will be served to you. You can take a look at View Source, and this is the HTML that is generated and served for you. We've got this web socket that will automatically refresh as you're making changes.

01:08 And so it is pretty good for a simple sort of thing. And lots of the React workshops use this format. So that is pretty much that. Feel free to complete the exercise if you would like to, and we'll see you in the next one. Go ahead and hit the next button.

01:24 We'll see you over there.