in React JS by
Q:

What is the purpose of push() and replace() methods of history?

1 Answer

0 votes
by

A history instance has two methods for navigation purpose.

  1. push()
  2. replace()

If you think of the history as an array of visited locations, push() will add a new location to the array and replace() will replace the current location in the array with the new one.

Click here to read more about React JS
Click here to read more about Insurance

Related questions

0 votes
asked Mar 30, 2020 in React JS by amita rallin
0 votes
asked Feb 23 in React JS by SakshiSharma
0 votes
asked Jul 2, 2019 in React JS by Venkatshastri
0 votes
asked Dec 18, 2020 in SVN by SakshiSharma
0 votes
asked Jul 2, 2019 in React JS by Venkatshastri
...