InterviewSolution
Saved Bookmarks
| 1. |
Does the following code have any errors? If yes, what is the error and how are you supposed to correct it? If not, which component (User,Admin,Customer) is going to be invoked when ‘/user/:name’ is navigated to. |
|
Answer» No, the code does not have any error, but SOMETIMES the URL might be matched by multiple routes, and the CONFUSION of which path needs to be MAPPED can be resolved by route matching priority. The priority is based on the ORDER of route configuration. i.e., The route which is declared first has higher priority.
|
|