TypeScript
Typescript cheat sheet for react functional components. useRef const divRef = useRef<HTMLDivElement>(null); setState const SkillSection = ({setScrollDuration} : {setScrollDuration: (value: number) => void}) =>...
Read more »
Get the user id of current active user in supabase. Supabase auth logged user's id get. Supabase next js code to get current logged...
Read more »
Validating input fields in React TypeScript App using class validator npm package - example code. Validating length and other parameters for input field and...
Read more »
Run React Apps on smartphones - Android and Ios devices. Access the localhost with a port number on our mobile devices to run and...
Read more »
How to create a new React App using TypeScript with help of npx create-react-app. We can easily create a new TypeScript React App with...
Read more »
Generic type definitions in TypeScript are useful in certain cases with function definitions. In some cases the function may accept any type of input...
Read more »
In typescript, we have to define types for a function definition. It may include type definitions for function parameters and type for the function...
Read more »
To avoid duplication or repeated type definitions, we have the type alias in TypeScript. We can do this easily using the type keyword in...
Read more »
Union Type definition in TypeScript allows us to have multiple types for a variable. For example, we can have the type of string and...
Read more »
TypeScript tries to infer as many types as possible by default in certain cases. It tries to know which types are used without us...
Read more »