FC em React

const Header = ({ loading, children } : { loading: boolean; children: React.ReactNode }) => {
  if (loading) {
    return undefined
  }

  return <header>{children}</header>
}
Doubtful Dingo