G
G
GreenLightUA2019-06-14 18:07:36
JavaScript
GreenLightUA, 2019-06-14 18:07:36

ReactJs back button not working on ios?

goBack() {
window.history.go(-1);
window.event.preventDefault();
}
This function does not work on ios. When you click on the button, it should return to the previous page, but iOS does not work. Thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Spirin, 2019-06-15
@rockon404

You need to use the history object that you pass to the router.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question