The What and Why: Robin Keys
The idea of Robin Keys is to provide flexibility and make for a better developer experience while naming fields for your User model.
Fundamentally, the
keys
object consists of the three unique fields we currently have for each user — userToken
, profileImage
, and userName
. The values of those fields should be strings you would rather refer to them as.Here's an example:
keys: {
userToken: 'user_token',
profileImage: 'profile_image',
userName: 'user_name'
},
This way, you can refer to a user’s user token as
user_token
, profile image as profile_image
, and username as user_name
.Interesting, right? You’re welcome!
Last modified 1yr ago