2023-01-01から1年間の記事一覧

Vocabulary: Model-View-Controller (MVC)

MVC (Model-View-Controller): MVC is a design pattern commonly used in software development to organize the structure of an application. It divides an application's components into three main parts: Model: The Model represents the data and …

Vocabulary: Call signature

A call signature in TypeScript is a way to define the type of a function or method within an interface or type. It specifies the shape of a function, including the parameter types and the return type. This allows you to describe the signat…

Vocabulary: Index signature

In TypeScript, an index signature (also known as an indexable type) allows you to define the types of properties that are not known in advance but can be accessed using square bracket notation. Index signatures are particularly useful when…

Vocabulary: Higher-Order Component (HOC)

A design pattern used in React that is a function that takes in a component and returns a new component. (getting all this from ChatGPT) import React from 'react'; function Greeting(props) { return <h1>Hello, {props.name}!</h1>; } export default Gr…

React: Generic Type

type ExampleComponentProps<T extends React.ReactElement> = { children: T; }; const ExampleComponent = <T extends React.ReactElement>({ children }: ExampleComponentProps<T>): React.ReactElement => { if ('onClick' in children.props) { console.log("children has an onClick prop"); } return <div>{childre…</div></t></t></t>

Testing Notes

-Unit Testing ・The testing of individual blocks of an application such as a class, function, or component. -Integration Testing ・Testing a combination of units and ensuring they work together. -E2E Testing ・Testing the entire applicatio…