上一页 1 ··· 80 81 82 83 84 85 86 87 88 ··· 494 下一页
摘要: Consider this createClassNamesFactory function that's similar to one I built for getting Tailwind class names that could then be passed into a React c 阅读全文
posted @ 2023-01-17 15:31 Zhentiw 阅读(29) 评论(0) 推荐(0)
摘要: This exercise begins with a makeStatus function that takes in an array of TStatuses that extends an array of strings. The statuses are then returned, 阅读全文
posted @ 2023-01-16 15:39 Zhentiw 阅读(26) 评论(0) 推荐(0)
摘要: There are two solutions to this challenge, both with different ways of representing the generic. Solution 1: The first option is using TConfig which e 阅读全文
posted @ 2023-01-14 22:20 Zhentiw 阅读(25) 评论(0) 推荐(0)
摘要: See this code: const array = [ { name: 'John', }, { name: 'Steve', }, ]; const obj = array.reduce((accum, item) => { accum[item.name] = item; // Eleme 阅读全文
posted @ 2023-01-14 01:37 Zhentiw 阅读(33) 评论(0) 推荐(0)
摘要: Here we have a Component class that can be passed in TProps. Inside of the constructor it assigns props to this, and provides a getProps method that c 阅读全文
posted @ 2023-01-12 15:53 Zhentiw 阅读(25) 评论(0) 推荐(0)
摘要: Consider this implementation of returnBothOfWhatIPassIn: const returnBothOfWhatIPassIn = (params: { a: unknown; b: unknown }) => { return { first: par 阅读全文
posted @ 2023-01-11 15:25 Zhentiw 阅读(19) 评论(0) 推荐(0)
摘要: Let's we have a form to submit new password. Before we send request to server, we want to force developer to valid the password before sending the req 阅读全文
posted @ 2023-01-04 15:54 Zhentiw 阅读(27) 评论(0) 推荐(0)
摘要: // print type PrintStart = { type: "print"; subtype: "start"; attributes: { controlsId: string; tabId: number; }; } type PrintAbort = { type: "print"; 阅读全文
posted @ 2023-01-04 03:46 Zhentiw 阅读(22) 评论(0) 推荐(0)
摘要: Let's imagine you're building a type helper to extract out the value from several different 'parsers'. Here are a few different examples of what a par 阅读全文
posted @ 2023-01-02 15:38 Zhentiw 阅读(23) 评论(0) 推荐(0)
摘要: Binding to Media Events import './assets/css/style.css'; import autumnMp4 from './assets/media/autumn.mp4'; const app = document.getElementById('app') 阅读全文
posted @ 2023-01-02 01:59 Zhentiw 阅读(32) 评论(0) 推荐(0)
上一页 1 ··· 80 81 82 83 84 85 86 87 88 ··· 494 下一页