Last active
May 22, 2021 15:53
-
-
Save Sergioamjr/067a388727ff0b7a5eef62849f6e07b8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useDebugValue, useState } from "react"; | |
function useUserStatus() { | |
const [isLogged, setIsLogged] = useState(false); | |
// ... | |
// Mostra um `label` no DevTools ao lado desse hook | |
useDebugValue(isLogged ? "Logged" : "Not logged"); | |
return isLogged; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment