react-launch-darkly
react-launch-darkly copied to clipboard
Add option to enable/disable overrides from query params
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 😄
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.