Last active
October 9, 2018 03:31
-
-
Save peaonunes/0e1d26c04754198dd6412096b7aacba4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { ApolloProvider } from 'react-apollo' | |
| import { ApolloClient } from 'apollo-boost' | |
| import FlaggedFeature from './FlaggedFeature' | |
| const client = new ApolloClient() | |
| ReactDOM.render( | |
| <ApolloProvider client={client}> | |
| <FlaggedFeature name="feature1"> | |
| {({ error, loading, enabled }) => { | |
| if (error) return 'Error!' | |
| if (loading) return 'Loading...' | |
| if (enabled) return 'Feature 1 is enabled.' | |
| return 'Feature 1 is not enabled.' | |
| }} | |
| </FlaggedFeature> | |
| </ApolloProvider>, | |
| document.getElementById('root') | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment