Kyle He
Kyle He
* Pause the video: `player.pause()` * Seek to a specific time: `player.currentTime = 30` or `player.seekTo(30)`
- Query Url、Request Headers、Response Headers 之间增加点 margin,能折叠就更棒了 - Query Url、Cookie 提供像 chrome developer tools 那样的 View decode/encode
``` html ``` 
UA 特征是 `Quark/1.7.1.916`
iOS 上 Firefox 的 ua 特征是 `FxiOS/1.2b345`
https://github.com/ecomfe/react-hooks/blob/8d89a72ea22b6591b9cb226e8378e8ba7cc1e1c2/packages/request/src/index.ts#L104-L107 Usage: ``` function DeleteButton ({segmentId, refresh}) { const [delete, {pending}] = useRequestCallback(deleteSegment, {segmentId}); const onClick = async () => { if (await confirm(message)) { await delete(); //
## 目标 通过hooks简化弹窗类组件的调用。 ## 现状 实现弹窗交互时我们通常写出这样的代码。当组件需求越来越复杂,或者一个页面中出现多个弹窗时,这样的写法使得组件内 state 满天飞,可维护性急剧下降。同时,打开弹窗操作所引起的 state 更新会导致整个组件刷新,照成性能问题。 ```jsx function Demo() { const [editId, setEditId] = useState(); const [editField, setEditField] = useState(); const EditorDialog = fieldToEditorMap[editField]; const openEditor...
https://github.com/ecomfe/react-hooks/blob/8d89a72ea22b6591b9cb226e8378e8ba7cc1e1c2/packages/request/src/index.ts#L163-L166 Expacted: ``` const resultFixedForEffect = { ...result, pending: result.pendingCount === undefined ? true : result.pending, + request, }; ``` So that I can trigger request automatically as well as...
**Prettier 1.10.2** [Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEA3AhgJwATuwXmwHIBGAJgGYKBWAFmptpqOwGpjLayuKSGiA3CAA0ICAAcYAS2gBnZKCyYIAdwAKWBPJTpUEKQBMRIdLJjIAZugA2suKIBGmdGADWcGAGVxLqVADmyDCYAK72IAYQYJY2dqJ+dpgwas7+ALboMbbhAFayAB4AQs5uHp7oaXAAMn5wWXFiITDiTWT14T6YicggDugOAJ7W0MbimH4wAOqGMAAWyGRkomMQdpPO4j1jcImodaKYcACOIVKHKejpmUhW2aJ2aVJBoeGyfv7WcACKIRDw7aIYP1pgY5shaIDnFJrO8AMIQNIZHpQaD7EAhOwAFX62ludgAvvigA) ```sh # Options (if any): --print-width=22 --tab-width=4 ``` **Input:** ```js var a = '123354535435' + '2342423153'; ``` **Output:** ```js var a = "123354535435" + "2342423153"; ```...