Questions on the Writing of react components

problem description

question about how to write react components?

the environmental background of the problems and what methods you have tried

whether stateless components need to write return. When I see other people"s code without return, I report an error
https://www.cnblogs.com/SamWe.

.

related codes

/ / Please paste the code text below (do not replace the code with pictures)
export const Home = () = > {

return (
        <div>
            <h1></h1>
            <nav>
                <Link to="/about"></Link>
                <Link to="/events"></Link>
                <Link to="/products"></Link>
                <Link to="/contact"></Link>
            </nav>
        </div>
    )

}

=
other people"s way of writing (without return)
export const Home = () = > {

        <div>
            <h1></h1>
            <nav>
                <Link to="/about"></Link>
                <Link to="/events"></Link>
                <Link to="/products"></Link>
                <Link to="/contact"></Link>
            </nav>
        </div>

}

what result do you expect? What is the error message actually seen?

with or without it?

Apr.22,2021

are you mistaken? The arrow function is used by others. Behind the arrow is not {} but (), is equivalent to direct return ()

.
export const Home = () => (

        <div>
            <h1></h1>
            <nav>
                <Link to='/about'></Link>
                <Link to='/events'></Link>
                <Link to='/products'></Link>
                <Link to='/contact'></Link>
            </nav>
        </div>
)
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e5badc-4d9e7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e5badc-4d9e7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?