Created
January 30, 2018 00:44
-
-
Save bdunn313/4b5bb18aadbd35443e5840cccac06c8d to your computer and use it in GitHub Desktop.
Settings List: naive solution
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Track | |
let preferences = { | |
allowNotifications: false, | |
shareLocation: false, | |
showFullName: false, | |
}; | |
// Toggle | |
const togglePref = (prefName) => { | |
preferences[prefName] = !preferences[prefName]; | |
return; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment