Last active
June 16, 2018 20:13
-
-
Save jesugmz/12d9b1c46c06339e3881291cbc3a9c3e to your computer and use it in GitHub Desktop.
Share constants (or globals) in JS
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
| export const ANIMAL_TYPES = [ | |
| { | |
| text: 'Perros', | |
| value: 1, | |
| }, | |
| { | |
| text: 'Gatos', | |
| value: 2, | |
| }, | |
| ]; |
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
| // consider to group multiple constant files under `constants` folder | |
| import { ANIMAL_TYPES } from './AnimalTypes.js'; | |
| console.log(ANIMAL_TYPES); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment