2023-06-01から1ヶ月間の記事一覧

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…