warning: This is a story about bullies and self-harm
Nice Rat Tail
Was the last thing he yelled at me on the diving board at the local swimming pool.
Next thing I know, he is holding me underwater not letting me get out of the pool.
He’s just playing, he didn’t mean to actually hold you under water.
Was the thing the lifeguard said, as I sat on the poolside gasping for air.
Why isn’t anyone helping?
Was the last memory I remember having when he was choking me on the locker room floor.
That is the potential for harm when you give an insincere compliment. …
Hooks landed in React a few months ago, and there has been a lot of excitement around them in terms of figuring out how to best use them, best practices, and how they map to current concepts in React and the lifecycle.
Many React developers are familiar with the React Component lifeCycle, and hooks like:
When trying to understand the useEffect hook, it’s natural to want to map it to the lifecycle methods we already know. At first glance, useEffect seems to be like a combination of componentDidMount and componentDidUpdate.
While this can be a useful way of looking at it at first, it may not be the most accurate. …
Although we usually know what components are needed when building most views within an app, sometimes we don’t know what they are until runtime. This means we need to build a screen based on the application state, user preferences, or response from an API. A common case is building dynamic forms, where the questions and components needed are either configured by a JSON object, or where fields change based on the users’ answers.