I have the following resources:


var gblData;

function getData(){
    //webservice to set value to gblData

React jsx file

//use the gblData to render the html page

html file

I tried the following ways to call the getData() before the jsx file so that gblData is not undefined. But it is failed.

1 html body onload function

2 jquery document ready