3week 과제#76
Open
j2-hyun wants to merge 1 commit into
Open
Conversation
dopa1213
reviewed
Jan 15, 2020
| fetchYoutube=()=>{ | ||
| const maxResults= 30 | ||
| const token = 'AIzaSyBbqaKKQoPQ_3njWfhavWM7YrV7M_M1C68' | ||
| const url = 'https://www.googleapis.com/youtube/v3/videos?part=snippet&chart=mostPopular' + '&videoCategoryId=' + 20 + '&key=' + token + '&maxResults=' + maxResults; |
There was a problem hiding this comment.
문자열과 변수를 혼용해야 할때
Template literals이라는 문법을 사용해서 사용가능합니다!
https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Template_literals
dopa1213
reviewed
Jan 15, 2020
| super(props); | ||
| this.state={ | ||
| //전체 화면 영상 | ||
| fullContent:{}, |
dopa1213
reviewed
Jan 15, 2020
| import axios from 'axios'; | ||
|
|
||
| class MainView 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: []}
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.
과제 업로드합니다.