const navigate = useNavigate()
<div
className="back-page"
onClick={() =>
navigate(back_page, {
state: { is_returning: new Date() },
})
}
>
<Button />
</div>
When the APP navigates to back_page
, it will retrieve the value for is_returning
. And then it should clear this state. How do I clear this state?