Top "Tsx" questions

Extension for TypeScript files using JSX syntax

React useState hooks error: Argument of type 'xxx' is not assignable to parameter of type 'SetStateAction<xx>'

I use react hooks to update, but notice error when setState. Argument of type '{ alertRules: any; }' is not …

reactjs typescript react-hooks tsx
How to serve multiple HTML files with React?

I want to build a web application with React with multiple HTML pages. For example login.html and index.html. …

html typescript react-native jsx tsx
TypeScript and ReactDOM.render method doesn't accept component

TL;DR I'm using TypeScript and React. I've defined my AppContainer.tsx component, exported it as default. I'm consuming this …

reactjs typescript typescript-typings react-dom tsx
Typescript RefForwardingComponent not working

I am trying to make my component accept a ref. I have a component like so: const MyComponent: RefForwardingComponent<…

reactjs typescript tsx
Pass props to child component in React, with Typescript (TSX file)

I am using VS2013 and getting an existing project set up to use React (0.14) and Typescript (1.8.5). My React code works …

reactjs visual-studio-2013 typescript jsx tsx
.tsx webpack compile fails: Unexpected token <

My app compiles with .ts, .js, and .jsx files and runs. Now I try changing a .jsx file to .tsx …

reactjs typescript webpack tsx
Prettier doesn't format .tsx file

I've used the Prettier extension in the visual studio code editor for a long time, but recently I am writing …

reactjs typescript visual-studio-code prettier tsx
ReactJS TypeScript pure component with children

I have a TSX component that is a container wrapping its children like this: import * as React from "react"; interface …

reactjs typescript visual-studio-2015 typescript-typings tsx