You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, thanks for reporting the issue. Personally I've not perceived this as an issue so far but that depends on the case. Have you had a look around the library to gauge how to possibly fix it?
I consider this an inconvenience, especially for non-boolean feature flags. For example, that particular flag dashboardColor has many variants that return a hex color. If I try to use the variant as-is in CSS properties, I'll have an invalid value during a few renders. Of course, this can be circumvented in the consumer with some explicit defaults/fallbacks, but it begins to be a hassle once your consumers grow in complexity or number. This can be a problem while writing unit tests as well since the first render will not include the valid flags, and we need to introduce some mechanism to wait for it to be in the correct state.
Yes, I read the documentation, but so far, I couldn't find a solution.
Describe the bug
Flags are evaluated as
false
during the first render even if default flags are provided.To Reproduce
Steps to reproduce the behavior:
yarn && yarn start
false
for all feature flags, even though the defaults are differentExpected behavior
Any tentative to evaluate flags should read from the default flags even during the first render.
Screenshots
The text was updated successfully, but these errors were encountered: