上一页 1 ··· 58 59 60 61 62 63 64 65 66 ··· 491 下一页
摘要: import { ReactNode } from "react"; import { Equal, Expect } from "../helpers/type-utils"; interface TableProps<T> { rows: T[]; renderRow: (row: T) => 阅读全文
posted @ 2023-08-12 16:19 Zhentiw 阅读(15) 评论(0) 推荐(0)
摘要: interface TableProps<T> { rows: T[]; renderRow: (row: T) => ReactNode; } export class Table<T> extends React.Component<TableProps<T>> { render(): Reac 阅读全文
posted @ 2023-08-12 16:08 Zhentiw 阅读(9) 评论(0) 推荐(0)
摘要: export const Table = <T>(props: TableProps<T>) => { return ( <table> <tbody> {props.rows.map((row) => ( <tr>{props.renderRow(row)}</tr> ))} </tbody> < 阅读全文
posted @ 2023-08-11 15:01 Zhentiw 阅读(14) 评论(0) 推荐(0)
摘要: Go ahead and install the Remote - Containers extension. This takes everything one step further: you can actually set up someone's editor for them when 阅读全文
posted @ 2023-08-09 14:36 Zhentiw 阅读(79) 评论(0) 推荐(0)
摘要: import { ComponentProps } from "react"; import { Equal, Expect } from "../helpers/type-utils"; const buttonProps = { type: "button", // @ts-expect-err 阅读全文
posted @ 2023-08-07 15:02 Zhentiw 阅读(19) 评论(0) 推荐(0)
摘要: ## Feed `env` to docker container In the code we need to use `const dataPath = path.join(process.env.DATA_PATH || "./data.txt");` When run docker cont 阅读全文
posted @ 2023-08-07 14:26 Zhentiw 阅读(20) 评论(0) 推荐(0)
摘要: So far we've been dealing with self-contained containers. Normally this is all you ever want: containers that can spin up and spin down as frequently 阅读全文
posted @ 2023-08-07 13:48 Zhentiw 阅读(20) 评论(0) 推荐(0)
摘要: const presetSizes = { xs: "0.5rem", sm: "1rem", }; type Size = keyof typeof presetSizes; //type LooseSize = Size | string; // the result will be strin 阅读全文
posted @ 2023-08-04 19:44 Zhentiw 阅读(9) 评论(0) 推荐(0)
摘要: <Parent> <child> <button /> </child> </Parent> function onClick(event) { console.log('target: ', event.target) // button console.log('currentTarget', 阅读全文
posted @ 2023-08-04 16:11 Zhentiw 阅读(25) 评论(0) 推荐(0)
摘要: const installedApps = await navigator.getInstalledRelatedApps() const packageId = "com.app.pwa" const app = installedApps.find(app => app.id packageId 阅读全文
posted @ 2023-08-04 15:38 Zhentiw 阅读(28) 评论(0) 推荐(0)
上一页 1 ··· 58 59 60 61 62 63 64 65 66 ··· 491 下一页