Error: React.Children.only expected to receive a single React element child nesting anchor tag in Link component
01:28 07 May 2020

I'm having a component called Nav inside components directory and it's code is some thing like below:

import Link from 'next/link';

const Nav = () => {
    return(
        
    )
}

export default Nav;

This gives me the error:

Error: React.Children.only expected to receive a single React element child.

But if I remove the tags within components, I can view the pages, but then in the console I'm getting a warning of:

Warning: You're using a string directly inside . This usage has been deprecated. Please add an tag as child of

So what am I doing wrong here?

javascript reactjs