Same question as Question [How to change the content based on the segment-button click] but for Ionic React.