Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React Native tag Image with Typescript. #8638

Closed
nschurmann opened this issue Jul 7, 2016 · 1 comment
Closed

React Native tag Image with Typescript. #8638

nschurmann opened this issue Jul 7, 2016 · 1 comment
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@nschurmann
Copy link

I have the following component written in Typescript:

const Welcome = (p: any) => 
  <View>
    <Image source={require('../assets/welcome-background.png')} />
  </View>

const styles = StyleSheet.create({
  container: {
    flex: 1,
    width: null,
    height: null
  }
})

which compiles to this:

const Welcome = (p) => React.createElement(View, null, React.createElement(Image, {source: require('../assets/welcome-background.png')}));
const styles = StyleSheet.create({
    container: {
        flex: 1,
        width: null,
        height: null
    }
});

Thus is throwing me this error:
screen shot 2016-07-07 at 2 06 08 pm
Is there a flag or an alternative way to load the images in the source tag? (the image is in where it says to be)

@ManAnRuck
Copy link

@nschurmann do you have a fix for this error?

@facebook facebook locked as resolved and limited conversation to collaborators May 24, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

3 participants