Open 89missions opened 2 days ago
Can you please provide more context? if it's the same as you have posted on Stack Overflow, it may be due to the naming. if you have named your state variable with a capital letter at the beginning like UserName react tries to render it as a component. Variables are supposed to have camel case names in react, only components have capitalized names.
So I have 3 pages , app.jsx and a folder which contains profile.jsx and edit profile.jsx . I'm passing a prop from app.jsx down to the other two, I am not using useContext hook. I'm just doing prop drilling . The problem is that , I'm trying to update a user name in edit profile.jsx using a state function from app.jsx . The error message is that , the function is not defined (the function which is passed as a prop) . Can anyone help me?