Current section: Sync External State 36 exercises
Problem

useSyncExternalStore

Loading exercise

Transcript

00:00 We've got ourselves a narrow screen notifier. So this text should change as the width of our screen changes. So that is your objective, is to make that work. And we're going to be using USYNC External Store to make that happen. You're going to use the MatchMedia API

00:17 to have a media query that will tell us whether or not the screen is a certain width. And you can subscribe to this, and it's kind of cool. So feel free to dive into the MDN docs. Also kind of hand-holdy in some of the comments, because I'm not here to teach you MatchMedia.

00:36 You can go learn that on your own time. I'm here to teach you how to use USYNC External Store, and that's what we're going to do in this exercise using Window MatchMedia. So have a good time. We'll see you in this exercise.