React Component to perform transitions on prop changes