63 likes
·
605 reads
4 comments
Love how straightforward this is. ✌ Really cool stuff.
I once had need for this feature flagging thing and ended up using environment variables to check if a feature is available or not, and this somehow required redeployment. This approach is way better. I am definitely using this next time. Thanks
Great article! I didn't know about ConfigCat. Looks like a cool service.
Two suggestions. Read the API key from the runtime environment. It shouldn't be in the code. kit.svelte.dev/docs/modules#$env-dynamic-p…
I think as currently written the user could briefly see the "oops" message before the feature flag is loaded. Does creating the configCat client and reading the feature flag need to be in onMount? Realistically, the client would be shared among components, so probably created in a separate file.