williaster commented on a change in pull request #5960: [feat] Feature flag 
system via config
URL: 
https://github.com/apache/incubator-superset/pull/5960#discussion_r221028314
 
 

 ##########
 File path: superset/assets/src/featureFlags.js
 ##########
 @@ -0,0 +1,11 @@
+// A higher-order function that takes the redux state tree and returns a
+// `isFeatureEnabled` function which takes a feature and returns whether it is 
enabled.
+// Note that we assume the featureFlags subtree is at the root of the redux 
state tree.
+export function isFeatureEnabledCreator(state) {
+  return feature => !!state.featureFlags[feature];
+}
+
+// Feature flags are not altered throughout the life time of the app
+export default function featureFlagsReducer(state = {}) {
 
 Review comment:
   sounds good 👍 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to