It's really necessary to do this? or just set the variable in 

    componentWillMount()

and use it in 

    componentWillMount()