Code Monkey home page Code Monkey logo

Comments (9)

RyanMitchellWilson avatar RyanMitchellWilson commented on June 26, 2024 1
<View style={styles.columnMiddle}>
  <CustomTouchableOpacity
    delay={0}
    onPress={this.play}
    style={styles.playButton}>
    <IonIcon
      name={isPlaying ? 'md-pause' : 'md-play'}
      style={playIconStyle}/>
  </CustomTouchableOpacity>
</View>

It works just fine when I edit the view, but not when I edit the CustomTouchableOpacity. Seems to only work on react-native specific jsx tags and not custom components or components from libraries.

from vscode-auto-rename-tag.

formulahendry avatar formulahendry commented on June 26, 2024

Could you share the code snippet of your TSX?

from vscode-auto-rename-tag.

RyanMitchellWilson avatar RyanMitchellWilson commented on June 26, 2024

Sure, the JSX inside a TSX file is the same as it is in a JSX file, but here is a quick example:

<View style={{flex: 1}}>
  <Text>Example TSX (Same as JSX)</Text>
  <Image src={require('../../...')}/>
</View>

Let me know if this helps

from vscode-auto-rename-tag.

formulahendry avatar formulahendry commented on June 26, 2024

It is working on my side. Could you disable all other extensions and try again?
pic

from vscode-auto-rename-tag.

RyanMitchellWilson avatar RyanMitchellWilson commented on June 26, 2024

Still not working. This works fine unless you have a file extension of tsx. For example Home.tsx instead of Home.jsx. Even if both files have the exact same code, this extension will only work for the jsx file not the tsx file.

Your example doesn't show the problem, save your file as something.tsx, the .tsx is the important part.

from vscode-auto-rename-tag.

formulahendry avatar formulahendry commented on June 26, 2024

Also work using ***.tsx file. Could you disable all other extension and try again?

from vscode-auto-rename-tag.

RyanMitchellWilson avatar RyanMitchellWilson commented on June 26, 2024

It seems to only work with React-Native components. Whenever I try it on a View or a Text tag it works just fine, but if I try to use this with a custom component or a component from a different library it doesn't work.

from vscode-auto-rename-tag.

formulahendry avatar formulahendry commented on June 26, 2024

Could you share the detailed code snippet?

from vscode-auto-rename-tag.

formulahendry avatar formulahendry commented on June 26, 2024

Got that. Duplicated with #19

from vscode-auto-rename-tag.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.