JS Party: JavaScript, CSS, Web Development cover image

Nick's big rewrite

JS Party: JavaScript, CSS, Web Development

CHAPTER

Is X-State Controlling the Context?

The context object is like a free for all. You can basically change that however you feel like whenever a state transition happens. There's not really anything enforced in there, right? About how you change it. You enforce it through those actions that you set up. But does X-State have any sort of model or conceptualization for validating context data? Like what types of things are validated and valid and allowed in that data versus not? Not really. So I create an interface of like, this is exactly what the context looks like. And then it's type safe from there.

00:00
Transcript
Play full episode

Remember Everything You Learn from Podcasts

Save insights instantly, chat with episodes, and build lasting knowledge - all powered by AI.
App store bannerPlay store banner