Open
Conversation
clonn
reviewed
Jun 3, 2019
Owner
clonn
left a comment
There was a problem hiding this comment.
有試著將其他參考範例加進來, tab 還蠻不錯的用法,
記得要設定一下 tab 縮排的部分,以免讓 review 的人覺得格式差異太大
| @@ -0,0 +1,17 @@ | |||
| import React from "react"; | |||
| TabsControl, | ||
| Tab, | ||
|
|
||
| }; No newline at end of file |
Owner
There was a problem hiding this comment.
這邊的排版明顯與上面的縮排不同,請採用統一格式,
1tab = 4space || 2space
src/components/TabsControl.js
Outdated
| @@ -0,0 +1,47 @@ | |||
| import React from "react"; | |||
| var createReactClass = require('create-react-class'); | |||
| let TabsControl = createReactClass({ | |||
Owner
There was a problem hiding this comment.
| this.setState({ | ||
| "todos": todos, | ||
| "omdblist": OmDb.Search | ||
| }) |
Owner
There was a problem hiding this comment.
可以改寫如下,
const { Search: omdblist} = await api.reloadOmDbApi();
// 接下來就可以直接,
this.setState({
todos,
omdblist
});
clonn
reviewed
Jun 4, 2019
src/components/TabsControl.js
Outdated
| } | ||
| }); | ||
|
|
||
| let Tab = createReactClass({ |
Owner
There was a problem hiding this comment.
現在可以直接採用
let Tab = () => {
render ....
}
module.exports = {
...
Tab
}
這樣是可以不用用到 createReactClass, 可以試試看
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.