Tag: react
All the articles with the tag "react".
Children as a React prop in TypeScript
Posted on:December 31, 2021How to type the 'children' prop for React Typescript components.
Creating a useCountdown React hook
Posted on:August 29, 2022I show you the process for creating a React hook for getting the days, hours, minutes, and seconds until an event, with tests to boot!
Find and replace HTML attributes with React props
Posted on:May 7, 2023Regex for finding and replacing all instances of HTML attributes with dashes to camelCase React props in VS Code.
Handling React state outside of React
Posted on:December 13, 2021How to call the setState function safely when using third-party libraries that are not compatible with React.
Inferring types from React PropTypes
Posted on:July 11, 2024How to infer Typescript or JSDoc types from React PropTypes.