8 Items I Added To My React + TypeScript Style Guides | by Jesse Langford | Mar, 2022

MyFile.tsx
myFile.tsxmy-file.tsxmy_file.tsxMy_File.tsx
const MyComponent: React.FunctionComponent = () => 
const MyComponent = () => operate MyComponent() 
export const MyComponent1: React.FunctionComponent = () => export const MyComponent2: React.FunctionComponent = () => 
const MyComponent: React.FunctionComponent = () => export default MyComponent
const [name, setName] = useState("")
const [name, updateName] = useState("")
if (var1 === var2) 
if (var1 == var2) 
interface IProps   var1: string  var2: boolean
function1(): voidconst MyComponent: React.FunctionComponent = (props: IProps) =>
interface IProps    var1: string  function1(): void  var2: booleanconst MyComponent: React.FunctionComponent = (props: IProps) => 
const MyComponent: React.FunctionComponent = () =>   const authenticated = true  return (    <div>      authenticated ? <p> You are Logged In </p> : null    </div>  )
const MyComponent: React.FunctionComponent = () =>   const authenticated = true    return (      <div>        authenticated && <p> You are Logged In </p>      </div>    )

More Posts