on button click redirect to another page in react js

Implement routing using react-router-dom package. In the redirect function, we use the location.href method to describe the location of the redirect.

on button click redirect to another page in react js