launchdarkly / react-client-sdk

LaunchDarkly Client-side SDK for React.js
Other
81 stars 67 forks source link

Dynamically update user attributes #90

Closed agionfriddo closed 2 years ago

agionfriddo commented 2 years ago

Is your feature request related to a problem? Please describe. The product I'm building has some user attributes that I would like to change enable/disable flags off of, but theses user attributes can be dynamic. For example, a user my belong to 3 locations, with locationId 1, 2, and 3. I may only want to show a feature to users that belong to locationId 3. Right now, it appears that once the the custom attribute of locationIds on a user is set with the identify method, it cannot be changed by calling the identify method with new values. So, if I remove locationId 3 from the user and send the new locationIds array to launch darkly, it's not updated.

Describe the solution you'd like I'd like the custom attributes to be updated when I either send new information with the identify method, or perhaps a different update user method that would allow me to change these attributes on a user.

Describe alternatives you've considered I could just not use these attributes with launch darkly, but it would be nice if I could

Additional context This is in the React SDK.

agionfriddo commented 2 years ago

My mistake. It seems that there is just a lag in the identify method being called and it showing up in my dashboard. Sorry for the confusion! Thanks for the great product.