--:--









Quiz for useNavigate & useParams

Course: REACT | Subject: React | Topic: React Router



Logo

Q1: What does the useNavigate hook do?

Logo

Q2: How do you navigate to a different route using useNavigate?

Logo

Q3: Which React Router hook is used to get dynamic URL parameters?

Logo

Q4: What is the return type of useParams?

Logo

Q5: Can useNavigate replace history.push?

Logo

Q6: How do you get the "id" parameter from URL "/user/:id"?

Logo

Q7: Can you navigate backwards programmatically with useNavigate?

Logo

Q8: How do you navigate to home route "/" using useNavigate?

Logo

Q9: Is useParams reactive to URL changes?

Logo

Q10: Which hook would you use to get current location?

Logo

Q11: How do you navigate to the previous page?

Logo

Q12: Can useNavigate be used outside React components?

Logo

Q13: How do you replace the current route instead of pushing a new one?

Logo

Q14: What will happen if you destructure a param not present in the URL?

Logo

Q15: Can you pass state via useNavigate?

Logo

Q16: How do you access the state passed via useNavigate?

Logo

Q17: Can useParams be used in class components?

Logo

Q18: Which of the following is true about useNavigate?

Logo

Q19: Does useParams work for query parameters?

Are you ready to start test? Set your time limit