According to the React-Navigation docs (https://reactnavigation.org/docs/header-buttons/), in the header, we can interact with screen\'s state:
function Stack