How to use useState in React to update state based on previous value?React is a JavaScript library that allows developers to build user interfaces with ease. One of the key features of React is the use of state to manage component data. State can be used to store information about a component that can change over time...2MAMar 10, 2023 · 3 min readslytherindor.hashnode.dev
How to perform async operation in useEffectReact's useEffect hook is a powerful tool that allows developers to perform side effects such as fetching data, updating the DOM, and interacting with third-party APIs. However, when using useEffect with asynchronous code, there can be some potential...Mar 3, 2023 · 3 min readslytherindor.hashnode.dev
Using specific object properties as hook dependencies in ReactReact is a powerful JavaScript library used to create user interfaces. One of its core concepts is the use of hooks, which allow developers to add state and lifecycle methods to functional components. One common issue that developers face when using ...Feb 24, 2023 · 2 min readslytherindor.hashnode.dev
using createPortal to show modal in ReactReact is a popular JavaScript library used for building user interfaces. One common feature of many applications is the use of modals or pop-ups. Modals can be used for a variety of purposes, such as displaying a login form or showing a confirmation ...Feb 17, 2023 · 3 min readslytherindor.hashnode.dev