After installed nextjs app on my local machine using create-next-app
I get this error in console Invalid href passed to router
.
Does anyone kno
Yes, nextjs throws that error. Don't use the component at all if linking to an external source, for external links you can use tag. In your case we can conditionally render either a plain anchor tag or use the link component if the prop matches an internal route. For example:
Link.indexOf('http') == 0 ? return(regular link) : return(...)