Open davidgoli opened 6 years ago
The documentation mentions a getFlag function, but subclassing the component & overriding it doesn't do anything. This is because the render method doesn't call getFlag, instead inlining the implementation:
getFlag
render
<Image source={Flags.get(iso2)} style={[styles.flag, this.props.flagStyle]} onPress={this.onPressFlag} />
We should change this to:
<Image source={this.getFlag(iso2)} style={[styles.flag, this.props.flagStyle]} onPress={this.onPressFlag} />
or, better yet, convert this into a prop that can be passed in without subclassing.
prop
The documentation mentions a
getFlag
function, but subclassing the component & overriding it doesn't do anything. This is because therender
method doesn't callgetFlag
, instead inlining the implementation:We should change this to:
or, better yet, convert this into a
prop
that can be passed in without subclassing.