es6 : how to import const after export?

You should probably structure your code in a completely different manner.

A good rule is to keep all constants in a separate file, away from all Views.

Try creating a file for all App Constants. Constants.js is a good choice.

Then put constants in like this:

const Constants = {
  HEADER_MAX_HEIGHT: 200,
  OTHER_THINGS: 'whatever'
}
export default Constants

Then you can import your constants wherever you need them.

import Constants from '../Folder/Constants'

and use like such

const x = Constants.HEADER_MAX_HEIGHT

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)