You have full access to the AnimationState the player uses. Use that instead of play/pause. Don't set an animation, then since you assign the player to playerRef.current
you can play an animation at any time like this:
playerRef.current.animationState.setAnimation(0, "animation-name", false);
The animation will continue to be played, so you can use an empty animation to fade it in/out, if you like:
playerRef.current.animationState.setEmptyAnimation(0, 0);
var entry = playerRef.current.animationState.addAnimation(0, "animation-name", false, 0);
entry.setMixDuration(0.5); // Fade in time (from setup pose).
playerRef.current.animationState.setEmptyAnimation(0, 0.5); // Fade out time (to setup pose).
See the API reference:
http://esotericsoftware.com/spine-api-reference
And:
https://esotericsoftware.com/spine-runtimes-guide