2023-01-01から1年間の記事一覧
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 …
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…
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…
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…
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>
-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…