Few Differences in this two

  1. useHistory() is react hook and props.history is properties of props
  2. we cannot use useHistory() in class component.
  3. we cannot use props.history in functional component directly, for that we have to wrap the component with withRouter. please follow this link click here

conclusion : if you are using class component then use props.history and if you are using functional component then use useHistory() hook

Related Query

More Query from same tag