there is an read properities cannot be undefined(_id) in the post method the Error Is {Cannot read properties of undefined (reading ‘_id’)}
hello guys there is issue in code i cannot get _id in require Auth method
there is an read properities cannot be undefined(_id) in the post method
hello guys there is issue in code i cannot get id in require Auth method
here is an requireAuth code
Uncaught TypeError: Object(…) is not a function – Error in react router
I have a react application hosted in Heroku. After updating some env vars in production my app is having a strange behavior:
invalid hook call. Hooks can only be called inside of the body of a function component. this of the fowwing reason
Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
In React in strict mode, a bug appears when updating the state after a React Router action
When the user clicks submit, React Router calls an API, and then in the component function, useActionData
hook is called to process the results of the API call and update the state.
React router dom v6 forward/backward navigation
In my react functional component, I have used navigate() [react-router-dom v6] to go forward and backward in the application. I need to detect whether forward/backward is available or not so that i can disable/enable icons. how to find it using react-router-dom methods? or any other javascript methods to detect like using window.history ?
How do you get `navigate` to update `useParams` hook values?
In React, I have a browser route that is effectively:
i want a user to get logged out if the param changes
This is the code and i want that the user gets logged out as soon as he tries to enters another param in the url.
React Query String Works in local but redirects to 404 in production
Description:
I have a React application with a route setup to display a public profile using parameters like /profile?id=test123
or /?profile=test123
. I’ve implemented the route using useSearchParams()
and useParams()
hooks.
React calling useEffect if state is not set
I have a react app using react-router