[TypeScript] Differences between .ts & .tsx

2023. 1. 7. 20:57·Development Study/Frontend
728x90

When we code with a typescript, we can see 2 extensions of it.


CASE .tsx

In this case, it means for files that contain JSX

 

TSX file is a TypeScript(.ts) file witten using JSX syntax.

It contains code that is most likely part of a single-page or mobile application

We usually open this in source code editors like VSCode


CASE .ts

In this case, it means for pure TypeScript files

.ts files have differences with .js

If you want to know about it,

 

Click Here to find out.

 

[배경지식] JavaScript? TypeScript? 이 둘의 차이는 무엇일까?

공통 객체 지향 프로그래밍 패러다임 = 데이터 추상화에 중심 - 객체와 클래스라는 두 주요 개념을 기반으로 한다 객체 기반의 스크립트 언어이다 웹의 동작을 구현하는 데에 쓰이는 언어이다

time-map-installer.tistory.com


End

 

 

References

더보기

https://stackoverflow.com/questions/56871384/what-is-the-difference-between-ts-and-tsx-extensions-both-are-used-as-extensi

 

What is the difference between .ts and .tsx extensions. Both are used as extensions for typescript files in react. So where shou

I am new to react and I am working on a project. I come across both .ts and .tsx extensions. I don't understand where should I use .ts and .tsx. Any help on this is much appreciated. Thank you!

stackoverflow.com

https://www.typescriptlang.org/docs/handbook/jsx.html

 

Documentation - JSX

Using JSX with TypeScript

www.typescriptlang.org

https://fileinfo.com/extension/tsx#:~:text=A%20TSX%20file%20is%20a,opened%20in%20source%20code%20editors.

 

TSX File Extension - What is a .tsx file and how do I open it?

Verified by FileInfo.com The FileInfo.com team has independently researched the React TypeScript file format and Mac, Windows, and Linux apps listed on this page. Our goal is 100% accuracy and we only publish information about file types that we have verif

fileinfo.com

 

728x90
저작자표시 비영리 변경금지 (새창열림)

'Development Study > Frontend' 카테고리의 다른 글

[TypeScript] TypeScript Grammar - 02  (0) 2023.01.07
[TypeScript] TypeScript Grammar - 01  (0) 2023.01.07
[배경지식] CSS 프레임워크를 알아보자  (1) 2022.12.31
[배경지식] JavaScript? TypeScript? 이 둘의 차이는 무엇일까?  (0) 2022.12.31
HTML + CSS 파일 연동하는 방법  (0) 2022.11.21
'Development Study/Frontend' 카테고리의 다른 글
  • [TypeScript] TypeScript Grammar - 02
  • [TypeScript] TypeScript Grammar - 01
  • [배경지식] CSS 프레임워크를 알아보자
  • [배경지식] JavaScript? TypeScript? 이 둘의 차이는 무엇일까?
ThreeLight
ThreeLight
ThreeLight Studio의 블로그, TimeMap.exe에 오신 것을 환영합니다.
  • ThreeLight
    TimeMap.exe
    ThreeLight
  • 전체
    오늘
    어제
    • 분류 전체보기 (245)
      • Checkpoint (1)
      • (3D)Dev Deep Dive (0)
        • Templates & Guides (9)
        • Frontend origin (9)
        • Backend origin (1)
        • TroubleShootings (4)
      • Development Study (95)
        • Frontend (36)
        • Backend (21)
        • CS(Computer Science) (2)
        • Background Knowledges (11)
        • Algorithm (2)
        • Mobile (3)
        • AWS (6)
        • Python (6)
        • MSW(MapleStoryWorlds) (8)
      • Coding Test (59)
        • 문제.zip (1)
        • BaekJoon_JavaScript (0)
        • Programmers_JavaScript (9)
        • BaekJoon_Python (23)
        • Programmers_Python (10)
        • Undefined_Python (3)
        • Programmers_SQL (13)
      • 활동내역.zip (43)
        • 개인 (21)
        • Techeer (12)
        • Bootcamp (7)
        • Hackathon (1)
        • TeamProjects (2)
      • 여기 괜찮네??(사이트 | App) (5)
      • 재미있는 주제들 (8)
      • 개발 외 공부 저장소 (11)
        • 생산운영관리 (3)
        • 생활속의금융 (6)
        • 경영정보시스템 (2)
  • 링크

    • TimeMap.dmg (Portfolio)
    • GitHub 바로가기
    • 오픈프로필(카카오톡)
    • Medium 바로가기
    • Disquiet 바로가기
    • LinkedIn 바로가기
  • 인기 글

  • 태그

    programmers
    Baek Joon
    Python
    HTML
    JavaScript
    react
    프로그래머스
    TypeScript
    CSS
    SQL
  • 최근 글

  • 최근 댓글

  • hELLO· Designed By정상우.v4.10.1
ThreeLight
[TypeScript] Differences between .ts & .tsx
상단으로

티스토리툴바