07-25-2021 09:06 - edited 07-25-2021 09:10
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

07-25-2021 09:06 - edited 07-25-2021 09:10
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
how do I force a toggle in /settings/index.jsx to be true when the user installs the app for the first time?
I've tried this at the end of the file
props.settingsStorage.setItem('myToggle', 'true')
but I get: Uncaught ReferenceError: props is not defined
If I place that statement inside the function where props was passed, I get
- settings/index.jsx:33,5TS1005: ')' expected.
- settings/index.jsx:34,3TS1128: Declaration or statement expected.

07-25-2021 09:11
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

07-25-2021 09:11
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I overlooked the fact that I accidentally threw it inside of a return statement 😖🤦:male_sign:
Everything is ok

