Skip to content

3week 과제#76

Open
j2-hyun wants to merge 1 commit into
yesjin-git:3weekfrom
j2-hyun:3week
Open

3week 과제#76
j2-hyun wants to merge 1 commit into
yesjin-git:3weekfrom
j2-hyun:3week

Conversation

@j2-hyun
Copy link
Copy Markdown

@j2-hyun j2-hyun commented Jan 3, 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;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

super(props);
this.state={
//전체 화면 영상
fullContent:{},
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fullContent는 사용하지 않으므로 삭제 해주시면 좋습니다

import axios from 'axios';

class MainView extends Component {
constructor(props) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

state를 사용하기 위한 방법으로 constructor에서 사용할수도 있지만

class property initializers를 이용해서 좀더 간단하게 state를 선언 하실수도 있습니다!
https://react.christmas/2017/17

ex) state = { fullcontent: {}, contents: []}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants