Leonardo is a full-stack developer, working with everything React-related, and loves to write about React and GraphQL to help developers. He also created the 33 JavaScript Concepts.
Wonder what challenges lie ahead when you want to use TypeScript with React and have a large code base to migrate? Find out in this blog, along with handy tips.
We’ll look at useStateMachine—a very lightweight but powerful state machine hook for React applications. Essentially combining useReducer and useEffect, it comes with many advanced features such as entry and exit callbacks, guarded transitions, extended state, etc.
Although useEffect is enough for most of our needs, we should know about the useLayoutEffect hook—running synchronously, it can be used for things such as animations, measurements, mutations, etc.