Current section: Sync External State 36 exercises
Problem

Make Store Utility

Loading exercise

Transcript

00:00 So now we want to make a reusable utility for this just to take it a little bit further. So you're going to make a make media query store that takes a media query and returns a hook. Wait, what? Yeah, you can totally dynamically create hooks. Why not?

00:16 And then you're going to use that. So this will allow us to do any sort of query. Like we could have a query for if we're in print mode or not. Like all sorts of interesting things. I don't even know if that would work because this is for JavaScript. But yeah, you could do all sorts of things with this utility once you're finished. So give it a whirl.