If that you must declare a worldwide variable in React, then you are able to do the next:
Create a file referred to as config.js
module.exports = world.config = {
one thing: {
somethingelse: {
quantity: 123,
identify: "Andrew"
}
}
};
Then import the config file the place you want it:
import './config';
Then the place you want it in your code:
world.config.one thing.somethingelse.quantity
or
world.config.one thing.somethingelse.identify