title: TypeError: Object(...) is not a function when using useHistory() hooks
body: <p>i have an onClick event on a button that pushes requests to a server and should go back to the homepage afetr submitting , i tried to use the Reactjs useHistory hooks on that component ,however i keep getting the error <code>TypeError: Object(...) is not a function</code>.</p>
  
  <p>I need help to get around it </p>