Created
March 11, 2018 14:43
-
-
Save MicroBenz/9731a903d532bfe14b95a9ea13094f0a to your computer and use it in GitHub Desktop.
React Context
This file contains 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
// Inside app that use ui-lib as dependencies | |
import { UIKitContext, Image } from 'ui-lib'; | |
const isProduction = process.env.NODE_ENV === 'production'; | |
const mediaPath = isProduction ? 'cloudfront-production' : 'cloudfront-development'; | |
const App = () => ( | |
<UIKitContext prefixPath={mediaPath}> | |
<h1>Hello World</h1> | |
<Image image="landing.jpg" /> | |
</UIKitContext> | |
); | |
export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment