typescript type for react props code example
Example 1: react tsx component example
import React from 'react';
interface Props {
}
const App: React.FC<Props> = (props) => {
return (
<div><div/>
);
};
export default App;
Example 2: typescript cheatsheet
enum Color {Red, Green, Blue = 4}
let c: Color = Color.Green