React Native - Accessing static variable on same class React Native - Accessing static variable on same class reactjs reactjs

React Native - Accessing static variable on same class


Since you are using static variable, you cannot use this. You can access the static variable like below.

class Constant {    static BASE_URL = 'https://xxxxx';    static URL_API_SERVER = Constant.BASE_URL + '/api/v2';    static STATIC_BASEURL = Constant.BASE_URL + '/static';    static URLSTRING_FAQ = Constant.STATIC_BASEURL + '/FAQ.html';    static URLSTRING_TOU = Constant.STATIC_BASEURL + '/TOU.html';}export default Constant;