Hooks were introduced in React 16.8 in late 2018. They are functions that hook into a functional component and allow us to use state and component features like componentDidUpdate, componentDidMount, and more. This was not possible before. Also, hooks allow us to reuse component and state logic across different components. This was tricky to do before. Therefore, hooks have been a game-changer. In this article, we will explore how to test React Hooks. We will pick a sufficiently complex hook and work on testing it. We expect that you are an avid React developer already familiar with React Hooks. In…
This story continues at The Next Web
No comments:
Post a Comment