Skip to content

Instantly share code, notes, and snippets.

@justinvdm
Created August 8, 2016 16:08
Show Gist options
  • Save justinvdm/2afd713ba19de8ae2d31f053c84784c0 to your computer and use it in GitHub Desktop.
Save justinvdm/2afd713ba19de8ae2d31f053c84784c0 to your computer and use it in GitHub Desktop.
// 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