6min chapter

Frontend First cover image

The problem with buttons on the web

Frontend First

CHAPTER

Is It Imperatively or Descriptively?

Dan amerob has been writing t the bata reactox about events versus effects, and it's like all this stuff is like dead on. If you have an event that happens once as a result of a user interaction, like a cliquYou want a wright, a handler, an event handler. An event handler is a set of imparative coat. That isn't what a use effect is for. And react, that's an effect. But thit's very two, very different things. Even though there are imperative steps in themiddle whereas the handler is literally an imperative function. So it's still that split, even though they use some of the sameps.

00:00

Get the Snipd
podcast app

Unlock the knowledge in podcasts with the podcast player of the future.
App store bannerPlay store banner

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode

Save any
moment

Hear something you like? Tap your headphones to save it with AI-generated key takeaways

Share
& Export

Send highlights to Twitter, WhatsApp or export them to Notion, Readwise & more

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode