- Created doc while stumbling upon this PR / issue in https://github.com/night/betterttv
- Also kudos Chrome network panel
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
// /pages/index.tsx | |
function ExamplePage() { | |
const { data } = useBackend( | |
"get-user-info", | |
async () => { | |
const data = await getProfileFromDB(); | |
return data; // {name: string} | |
}, | |
{ prefetch: true } |