Made a separate function for resolving flexible length
Made a separate function for resolving flexible length

Reviewed By: emilsjolander

Differential Revision: D6834269

fbshipit-source-id: 954bc7fe8eb9256d353cdda27e5c64c076808e25

hammerandchisel/react-native,javache/react-native,pandiaraj44/react-native,pandiaraj44/react-native,exponent/react-native,myntra/react-native,hoangpham95/react-native,exponentjs/react-native,exponent/react-native,janicduplessis/react-native,exponent/react-native,hoangpham95/react-native,hammerandchisel/react-native,facebook/react-native,hoastoolshop/react-native,hammerandchisel/react-native,hoangpham95/react-native,janicduplessis/react-native,exponentjs/react-native,hammerandchisel/react-native,facebook/react-native,exponentjs/react-native,facebook/react-native,hoastoolshop/react-native,javache/react-native,janicduplessis/react-native,hoastoolshop/react-native,hammerandchisel/react-native,exponentjs/react-native,myntra/react-native,exponentjs/react-native,exponent/react-native,arthuralee/react-native,exponentjs/react-native,myntra/react-native,hoastoolshop/react-native,facebook/react-native,myntra/react-native,pandiaraj44/react-native,javache/react-native,exponentjs/react-native,pandiaraj44/react-native,javache/react-native,exponent/react-native,hammerandchisel/react-native,facebook/react-native,myntra/react-native,pandiaraj44/react-native,arthuralee/react-native,myntra/react-native,javache/react-native,javache/react-native,hoastoolshop/react-native,hoangpham95/react-native,hoangpham95/react-native,myntra/react-native,myntra/react-native,arthuralee/react-native,janicduplessis/react-native,hoastoolshop/react-native,exponent/react-native,janicduplessis/react-native,janicduplessis/react-native,hoangpham95/react-native,exponent/react-native,exponentjs/react-native,pandiaraj44/react-native,janicduplessis/react-native,arthuralee/react-native,hammerandchisel/react-native,facebook/react-native,facebook/react-native,hoastoolshop/react-native,arthuralee/react-native,javache/react-native,facebook/react-native,pandiaraj44/react-native,javache/react-native,hoastoolshop/react-native,hammerandchisel/react-native,hoangpham95/react-native,hoangpham95/react-native,pandiaraj44/react-native,myntra/react-native,facebook/react-native,janicduplessis/react-native,javache/react-native,exponent/react-native