Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to access props in settings?

ANSWERED

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!

Best Answer
1 BEST ANSWER

Accepted Solutions

Try using - props.settingsStorage.getItem('gps')

View best answer in original post

Best Answer
1 REPLY 1

Try using - props.settingsStorage.getItem('gps')

Best Answer