Skip to content

Instantly share code, notes, and snippets.

View 29Kumait's full-sized avatar
:octocat:

Kumait 29Kumait

:octocat:
View GitHub Profile
@29Kumait
29Kumait / ReactTypeScript.md
Last active June 25, 2024 07:48
TypeScript & React concepts with practical example.

1. Interfaces for Component Props

interface ProductProps {
  name: string;
  price: number;
  imageUrl: string;
  inStock: boolean;
}
@29Kumait
29Kumait / ExampleTypeScriptReact.md
Created April 26, 2024 20:58
TypeScript examples in React

.

1. Basic Types and Interfaces

Basic component that displays a greeting message. This will illustrate the use of basic types and interfaces for component props.

import React from 'react';

interface GreetingProps {
@29Kumait
29Kumait / TypeScript.md
Created April 26, 2024 20:04
Essential TypeScript Concepts for React Development

Essential TypeScript Concepts for React Development

Fundamentals

  • Types: Master basic types (string, number, boolean, etc.), arrays, tuples, and enums for robust data modeling.
  • Interfaces: Structure objects and React components with interfaces to enforce type safety, promoting code predictability.
  • Generics: Employ generics to craft reusable components and functions that seamlessly operate on various data types.

React Integration

  • Function Components: Utilize React.FC and interfaces/type aliases to precisely type component props and accurately model component behavior.
  • Hooks: Grasp the intricate typing of React hooks like useState, useReducer, and useContext to ensure state management aligns with expected data types.
@29Kumait
29Kumait / mysql_cheat_sheet.md
Created November 18, 2023 15:12 — forked from bradtraversy/mysql_cheat_sheet.md
MySQL Cheat Sheet

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH