这是他们的示例组件。
class MyAwesomeComponent extends React.Component {
state = {
selectedDay: new Date(),
};
handleDayClick = day => {
this.setState({
selectedDay: day,
});
};
render() {
return (
<div>
<DayPicker
onDayClick={this.handleDayClick}
selectedDays={this.state.selectedDay}
/>
</div>
);
}
}
你如何从这个示例反应组件中获取选定的数据?