That hip business is tricky. Since one is not suppose to move the affected area in certain ways getting on and off the bike could be awkward. especially if you had a foot slip of hit some loose stuff
My wife was OK with one hip replacement getting in and out of a sidecar but after the second was installed she didn't have the movement to be a passenger anymore.
Depends on how young and repairable you are. If you heal fast and are in good muscle tone, getting back to riding may not be a problem.
If you are in geezerhood, it might be an unpleasant ordeal.