#Migration to v6 - How to recognize a back button action?

1 messages · Page 1 of 1 (latest)

coarse holly
#

Hi all,

I'm migrating a project from v5 to v6, in a hook I used history.action === 'POP'; to check if the back button was clicked. I've tried to check in the documention and I can't find a replacement for that in v6. How would I go about it?

history used to come from useHistory, but the migration guide says to replace that by useNavigate, which doesn't have an action prop.

Thanks for any help.

coarse holly
#

Really? Nobody? 😢

rugged vapor