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 Android - Single/Multiline comments throws error #2823

Closed
ghost opened this issue Sep 17, 2015 · 3 comments
Closed

React Native Android - Single/Multiline comments throws error #2823

ghost opened this issue Sep 17, 2015 · 3 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@ghost
Copy link

ghost commented Sep 17, 2015

If I put a single or multiline comment inside a <View> enclosure throws an error Trying to add unknown view tag: and what looks like an array map of the tags.

screen shot 2015-09-17 at 3 13 00 pm

Also found that if I use a multiline comment, the interpreter still renders the commented out elements

Such as

/*
   <View>
      <Image source={require('image!bg_splash')} style={{}} />
   </View>
*/

I still received unknown module 'image!bg_splash' during my last issue #2808

@ide
Copy link
Contributor

ide commented Sep 17, 2015

This is how JSX works (independent of React Native). JSX does not support comments - you need to push them in to JS, ex: {/* comment */}

@ide ide closed this as completed Sep 17, 2015
@ghost
Copy link
Author

ghost commented Sep 17, 2015

Got it. Thank you.

@phongyewtong
Copy link

Just curious, does this create any performance overhead?

@facebook facebook locked as resolved and limited conversation to collaborators Jul 21, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 21, 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

4 participants