Created
August 8, 2016 16:08
-
-
Save justinvdm/2afd713ba19de8ae2d31f053c84784c0 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
// vars.js | |
const FG1 = '#333'; | |
// ... | |
export FG1; | |
// SomeComponent.js | |
const styles = StyleSheet.create({ | |
foo: { | |
// ... | |
}, | |
bar: { | |
// ... | |
}, | |
}); | |
// try maintain some separation of concerns by only ever referring to styles | |
// defined above here (even one liners) | |
const SomeComponent = () => ( | |
<div> | |
<div style={{styles.foo}}></div> | |
<div style={{styles.bar}}></div> | |
</div> | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment