Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
React navigation header hooks example
function MyScreen({}) {
const [numSelected setNumSelected] = useState(false);
useHeaderTitle(numSelected > 0 ? `${numSelected} tasks selected` : 'Task selection');
return ...
function MyScreen({}) {
const [doApiRequest, isLoading] = useMyApi();
isLoading ? <ActivityIndicator /> :
<Button onPress={doApiRequest}>Done</Button>
return ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.