JavaScript Jabber cover image

The React Way & Opinionated Practices with Ian Schwartz - JSJ 488

JavaScript Jabber

00:00

Do I Need to Put a Hook in Here?

A lot of times hooks can be replaced by turnary statements. You may already have a p you're going to use a reactlit to hold that state. But are you going to if a prop is being passed down, is ok? I've seen components where they'll say, like, you have a use state that says it's a bullyon. And the argument of u state takes a default prop, and maybe they'll use it. It's very easy to accidentally realize i have a piece of state that's already covering this or this is something here in your light motor dark mode theme,. Write, and you have a presentational component, this is a really extreme example, behave

Transcript
Play full episode

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app