Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/xuhongbo/weekly
Browse files Browse the repository at this point in the history
  • Loading branch information
xuhongbo committed Mar 5, 2019
2 parents bcd5a06 + e363e36 commit 15ee4e7
Show file tree
Hide file tree
Showing 3 changed files with 597 additions and 12 deletions.
2 changes: 1 addition & 1 deletion 58.精读《Typescript2.0 - 2.9》.md
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ fetch(`/api?type=${monaco.languages.types.Folder}`);
一般我们会这么描述其数据结构:

```typescript
const data: string[][] = [[1, 5.5], [2, 3.7], [3, 2.0], [4, 5.9], [5, 3.9]];
const data: number[][] = [[1, 5.5], [2, 3.7], [3, 2.0], [4, 5.9], [5, 3.9]];
```

在 TS `2.7` 版本中,我们可以更精确的描述每一项的类型与数组总长度:
Expand Down
24 changes: 13 additions & 11 deletions 92.精读《React PowerPlug 源码》.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,19 @@ React 项目中,一般一个文件就是一个类,状态最细粒度就是
```typescript
class App extends React.PureComponent {
state = {
name = 1
isLoading = false
isFetchUser = false
data = {}
disableInput = false
validate = false
monacoInputValue = ''
value = ''
}
name: 1,
isLoading: false,
isFetchUser: false,
data: {},
disableInput: false,
validate: false,
monacoInputValue: "",
value: ""
};

render () { /**/ }
render() {
/**/
}
}
```

Expand Down Expand Up @@ -686,6 +688,6 @@ Compose 也是个有趣的组件,可以将上面提到的任意多个组件组

另外 Hooks 版的 PowerPlug 已经 4 个月没有更新了(非官方):[react-powerhooks](https://github.com/kalcifer/react-powerhooks),也许下一个维护者/贡献者 就是你。

> 讨论地址是:[精读《React PowerPlug》 · Issue #129 · dt-fe/weekly](https://github.com/dt-fe/weekly/issues/129)
> 讨论地址是:[精读《React PowerPlug 源码》 · Issue #129 · dt-fe/weekly](https://github.com/dt-fe/weekly/issues/129)
**如果你想参与讨论,请[点击这里](https://github.com/dt-fe/weekly),每周都有新的主题,周末或周一发布。前端精读 - 帮你筛选靠谱的内容。**
Loading

0 comments on commit 15ee4e7

Please sign in to comment.