Open lfoyh6591 opened 2 years ago
Redirect
redirects a user to the destination instantly.
However, NavLink
makes a link to the destination. (like this NavLink)
By putting NavLink
, we can give user a choice to go to the page or not.
On NewTodo
, we designed to go back to TodoList
on submit button by force (without user's choice).
On TodoList
, we just made a link that user could select to go to NewTodo
or just stay on the current page.
What's the difference with Redirect and NavLink? I thought they have similar attribute which is to go to another link . Then why did we use Redirect on NewTodo.js, and NavLink on TodoList.js?