Skip to main content

useFonts

Platforms:✓ Expo

This hook fixes an issue with useFonts from 'expo-font'.

import { Inter_700Bold } from '@expo-google-fonts/inter'
import { useFonts } from '@healthblocks-io/native/useFonts'

function App() {
const [ready] = useFonts({ Inter_700Bold })
if (!ready) return null
return (
<View>
<Text style={{ fontFamily: 'Inter_700Bold' }}>Hi</Text>
</View>
)
}