find method returns undefined

useEffect() hook will be called after rendering / component update. so, on First time the users value will be empty array.

so, the selectedUser value will be undefined. Wrap it in another useEffect will work.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top