0
我試着用redux存儲DatePickerIOS日期。 有沒有辦法使用AsyncStorage?到目前爲止,我一直在努力嘗試。有沒有關於如何通過簡單的DatePickerIOS組件使用AsyncStorage的建議?本機反應 - DatePickerIOS與AsyncStorage
<DatePickerIOS
style={{ paddingTop: 110 }}
mode='date'
date={this.state.d}
onDateChange={(d) => this.onDateChange(d)}
/>
constructor(props) {
this.state = { date: newDate() };
}
onDateChange(d) {
this.setState({
d: d
});
我想要的數據持久化的頁面刷新或導航。這就是我想要AsyncStorage的原因。 'd'和'startdate'是一個錯字。我會改變這一點。 – wizardo
看看我的編輯,所有的信息可以在這裏找到https://facebook.github.io/react-native/docs/asyncstorage.html – Poptocrack
感謝您的幫助:) – wizardo