Hi guys I\'m a beginner programmer just started on react router.
I have two questions. What is the difference between using an
The component allows you to do more than the normal link element. For instance, because it's a React component you have the benefits of having a state and what not (if you want that). You can see more documentation on here. Without the error I'm not sure what happens, but I suspect the routing library wants you to use the component, over a normal html element.
With regards to () => {} this is a construct which is called an anonymous function, or a lambda expression. It's basically the same as saving a function in a variable: var x = function(){ return (const x = (y) => return y*2; The reason it's done in React is to expose the function scope to the component it lies in.