i try to logout from my dashboard components, it stuck on dashboard with loading and all the dashboard content remove
Here is my code to get the dashboard form backend using useEffect and then the handler to handle the logout button
After few time if I reload the page then its redirected the login page.
the problem was when i try to logout from my dashboard components, it stuck on dashboard with loading and all the dashboard content remove
Here is my code to get the dashboard form backend using useEffect and then the handler to handle the logout button
I try to build a dashboard and try to access when user login but the problem was when i try to logout it stuck on dashboard with loading
Here is my code to get the dashboard form backend using useEffect and then the handler to handle the logout button
React radio input type and defaultChecked behaviour with useEffect()
I have a situation where I want to set the default value of a radio group as a side effect of a deferred call. However, it would appear that the defaultValue property is ignored on a state update, and I’m at a loss to understand why. Here is a simple example, which I ran through https://playcode.io/react:
Why does my React useEffect hook run multiple times even with an empty dependency array?
I’m working on a React project and encountering an issue with the useEffect hook. My goal is to fetch data from an API only once when the component mounts. However, the useEffect seems to run multiple times, even though I’ve provided an empty dependency array.
Does does a useEffect and useCallback act when both have same dep(s)?
can someone help me with this question on behavior, here is a made up code snippet
Does does a useEffect and useCallback act when both have same dep(s)?
can someone help me with this question on behavior, here is a made up code snippet
Does does a useEffect and useCallback act when both have same dep(s)?
can someone help me with this question on behavior, here is a made up code snippet
Is there a way to set const value which can change due to its dependencies?
I am trying to set a const value using useState hook:
Two (or more) custom hooks which send rest requests (post, put, get), do something with the results and I want they work sequentially
I have a React application, in which I need: