Yuvraj Patil

General

Create a React App with TypeScript template

npx create-react-app uv-app --template typescript

Functional Component

Frequently Used

Event Handling

<button onClick={activateLasers}>
Activate Lasers
</button>

Render List

{
students.map((obj: any, index: any) => (
<div key={index}> {obj.title} </div>
))
}

Conditional rendering

Type 1: If statement style

{props.hasImage &&
<MyImage />
}

Type 2: If else statement style

{props.hasImage ?
<MyImage /> :
<OtherElement/>
}

Hooks

useState

useEffect

useSelector

Others

Memotization

A. Component

B. Function

--

--

This is my personal collection of cheatsheet for Excel.

Indian Number Format

[>=10000000]##\,##\,##\,##0;[>=100000] ##\,##\,##0;##,##0.00

Current Day, Month & Year

=MONTH(TODAY())    // Current month
=YEAR(TODAY()) // Current year
=DAY(TODAY()) // Current day of month. (Select type as number)

DATEIF

  • Calculate difference between dates.
=DATEDIF(M4,TODAY(), "M")

IF ELSE

=IF(TRUE,4,5)

Last Value of Column

=LOOKUP(2,1/(B:B<>""),B:B)

IFERROR

  • If formula can give error, this will help to handle that error.
=IFERROR (value, value_if_error)

--

--

Yuvraj Patil

Yuvraj Patil

Loves coding and enjoys learning new technologies. Website: https://.yuvrajpatil.com