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

Answer

A history instance has two methods for navigation purpose.

push()
replace()

If we 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.

All react js Questions

Ask your interview questions on react-js

Write Your comment or Questions if you want the answers on react-js from react-js Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---