React and TypeScript React and TypeScript

Asynchronous Events Exercise

Check out a free preview of the full React and TypeScript course:
The "Asynchronous Events Exercise" Lesson is part of the full, React and TypeScript course featured in this preview video. Here's what you'd learn in this lesson:

Students are instructed to wire up the forms and events with some asynchronous data to load the requested number of dog facts.

Get Unlimited Access Now

Transcript from the "Asynchronous Events Exercise" Lesson

[00:00:00]
>> We're gonna give you a quick exercise to kind of bring this all together, and then what we're gonna do after that we're gonna move into things. How do you actually type reducers, how do you have context and things of that nature? So let's go take a look here, we're gonna try to pull everything that we've worked on together.

[00:00:17] We have this application here, which is going to asynchronously load, I mean, it's truly a synchronous, it is not really API. It's gonna asynchronously load some dog facts based on a form that we're gonna do a submit event, so on and so forth. You're gonna visit this sandbox right here or it is under projects, in dog facts, in the repo, if you wanna just NPM install and spin it up locally.

[00:00:40] If you wanna use those tools, like whatever makes you happier, what we wanna do is we'd love to select some number of dog facts that we would like as you can see right now we can't do anything. And then, what we wanna do is go fetch them and they should load after the fact.