This is the custom react hook which you can use to call the api and it will return the data,error(if any),loading status.