12-04-2017 14:13
12-04-2017 14:13
Hello, I am trying to access the props in setting in a manner similar to the example of the TextInput in the Settings API where if a toggle is true the text field should be disabled. When I try:
disabled={!(this.props.mySettings.gps === "true")}
in any combination of my settingsKey's and settings name I get the: Uncaught TypeError: Cannot read property 'props' of undefined. How could I structure my settings page to allow this functionality? Thank you!
Answered! Go to the Best Answer.
12-04-2017 20:41
12-04-2017 20:41
Try using - props.settingsStorage.getItem('gps')
12-04-2017 20:41
12-04-2017 20:41
Try using - props.settingsStorage.getItem('gps')