I'd like to use this segmented control library with the options Day, Week, Month, and Year. Whenever I pick one of these the chart should update and the axis scale should change corresponding to what I picked. For example, if I was on Week, the axis scale would be Sun, Mon, Tue, Wed... Then, if I changed it to Month, the axis scale should change to Jan, Feb, Mar... Is there I can do this with React Hooks?
import SegmentedControl from '@react-native-segmented-control/segmented-control';return (<SegmentedControl values={['One', 'Two']} selectedIndex={this.state.selectedIndex} onChange={(event) => { this.setState({selectedIndex: event.nativeEvent.selectedSegmentIndex}); }} />);