How to comment out Text? #12948
|
I tried to add or change the code in the training development website: https://reactnative.dev/docs/intro-react?language=typescript. When I tried to put /* and / for multiline comments, my react native run command keeps showing an error. I just tried this and it won't work. Update: I'm able to comment out the onPress function. OR Is there a way to insert multiline comments outside so I can keep the code without using it? This is for my own reference. |
Replies: 3 comments 2 replies
|
I think this is what you want. <Text>{/* Hello, I am your cat! */}</Text> |
|
Yes. I just found a video where curly braces it outside the text tag. That can also be done. Why is "/* " and " */" not enough? What's different about react native? Can someone answer? |
|
It's all for React native for mobile programming. Is this the correct place to ask? |
I think this is what you want.