Question about the use of useSession() callback

Why do all of the examples do the const {data:sessionData} for the callback when you can just write
const sessionData = useSession();
?

const Home: NextPage = () => {
    const {data:sessionData} = useSession();
    const printMessage = () => {
        console.log(sessionData?.user.firstName);
    };
Was this page helpful?