0

``i want to pass the status of islogged from login.js file to navbar file to update the name as per the user logined . Can anyone please cehck and help me out in this .Passing value from one component to another in react for updating the login status to navbar enter image description here```

  • export const Navbar = (props) => { console.log(props.isLoggedIn) const products=useSelector((state)=>state.cart.cartItems) // console.log(products.length) {props.isLoggedIn==="true"?{localStorage.getItem("name")}: null} – Tushar Kumar Aug 01 '23 at 07:04

0 Answers0