react-launch-darkly icon indicating copy to clipboard operation
react-launch-darkly copied to clipboard

Add option to enable/disable overrides from query params

Open dmattia opened this issue 5 years ago • 1 comments

Overrides are great for testing purposes (and our dev/staging envs), but I would like to disable query param overriding in our production build.

Adding this as a param on <LaunchDarkly allowOverrides={false}> would be nice.

If you are open to this change, I am open to making a PR for it 😄

dmattia avatar Dec 18 '19 18:12 dmattia

That sounds great, please do.

I think we want to leave the default behavior as-is so that we don't have to release a major version; so please make the implementation be opt-in.

Also we don't have a preexisting configuration reader in the library. Even if we did, that might only help server-rendering folks. So maybe the best idea is to make it a prop with default at the top-level <LaunchDarkly /> provider? We'd have to drill it down or context it to where it's needed, but that's no big deal.

sethbattin avatar Dec 18 '19 20:12 sethbattin