3week HW#74
Open
ksh0323a wants to merge 3 commits into
Open
Conversation
added 3 commits
December 28, 2019 18:55
dopa1213
reviewed
Jan 15, 2020
|
|
||
| export default class Game extends Component { | ||
|
|
||
| constructor(props) { |
There was a problem hiding this comment.
state를 사용하기 위한 방법으로 constructor에서 사용할수도 있지만
class property initializers를 이용해서 좀더 간단하게 state를 선언 하실수도 있습니다!
https://react.christmas/2017/17
ex) state = { fullcontent: {}, contents: []}
dopa1213
reviewed
Jan 15, 2020
| const maxResultSize = 21 | ||
| const token = 'AIzaSyA2oEpIi9JSjjUk4_0zxcBfDg8iscuJXzs' | ||
| axios.get( | ||
| 'https://www.googleapis.com/youtube/v3/videos?part=snippet&chart=mostPopular' + |
There was a problem hiding this comment.
문자열과 변수를 혼용해야 할때
Template literals이라는 문법을 사용해서 사용가능합니다!
https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Template_literals
ex) https://www.googleapis.com/youtube/v3/videos?part=snippet&chart=mostPopular&videoCategoryId=${categoryIdOfGaming}&key=${token}&maxResults=${maxResultSize}
dopa1213
reviewed
Jan 15, 2020
| constructor(props) { | ||
| super(props); | ||
| this.state = { | ||
| fullContent: {}, |
There was a problem hiding this comment.
fullContent 는 사용하지 않는 state이므로 삭제 해주시면 좋을것 같습니다!
dopa1213
reviewed
Jan 15, 2020
| setContents = (data) => { | ||
| let list = [] | ||
| data.items.forEach((item, index) => { | ||
| console.log({...item}) |
There was a problem hiding this comment.
숙제긴 하지만 평소에 불필요한 console.log를 지워주시는 습관을 들이시면 좋습니다
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.
3주차 과제입니다. /youflix-hw3 디렉토리를 확인하시면 됩니다.