Question about arrow function using useEffect()

after I read this article When should I use a return statement in ES6 arrow functions, I’m still a little bit confused.Why the following code useEffect uses the curly braces, but without return it still works? Not sure if I misunderstand something.
Here is the example:

import React,{useEffect,useState} from "react"

function App() {
  const [resourcetype,setresourcetype]=useState("posts")

  return (
      <button onClick={()=>setresourcetype("try")}>try</button>
      <button onClick={()=>setresourcetype("unknown")}>unknown</button>

export default App;

44 thoughts on “Question about arrow function using useEffect()”