Closed cruessler closed 1 year ago
Hello @cruessler ,
Thanks for reaching out. We are discussing it with the team, and we'll get back to you.
Cheers,
Hello @cruessler,
We are currently working on the default user feature in all of our SDKs (and some other cool new features): https://trello.com/c/0pvK6RvY/67-major-sdk-upgrades You will be able to pass a default user to the ConfigCatProvider as well in the next major SDK release.
Cheers,
@laliconfigcat That’s great news! And thanks for the quick reply!
This issue is marked stale because it has no activity in the last 3 weeks. The issue will be closed in one week. Please remove the stale flag to keep it open.
Hello there,
We've just released the new SDK with the requested feature. You can read more about it here: https://configcat.com/docs/sdk-reference/react/#default-user
Let me know if you have any questions. Any kind of feedback is much appreciated.
Cheers, Lali
Thank you very much, we’ll try the new feature and let you know if we find any issues!
Is your feature request related to a problem? Please describe.
Currently, if I want to retrieve feature flags for a specific user, there is only one way to achieve that. I have to pass a user object to
useFeatureFlag
.https://configcat.com/docs/sdk-reference/react/#user-object
Describe the solution you'd like
I would have expected to be able to pass a user object to
ConfigCatProvider
, and that every call touseFeatureFlag
in one of its descendants then implicitly uses that user object when querying for feature flags.Describe alternatives you've considered
I could use
useFeatureFlag
, but that would be more effort because I would have to get a user object and pass it touseFeatureFlag
everywhere I useuseFeatureFlag
.Additional context
I don’t know whether the omission of this feature was a deliberate decision, so maybe this has already been thought through and decided against.