분류 전체보기
-
Rendering Poster ComponentReact 2019. 11. 21. 21:27
TVPresenter.js import React from "react"; import PropTypes from "prop-types"; import styled from "styled-components"; import Section from "../../Components/Section"; import Loader from "../../Components/Loader"; import Message from "../../Components/Message"; import Poster from "../../Components/Poster"; const Container = styled.div` padding: 0px 20px; `; const TVPresenter = ({ topRated, popular..
-
Poster ComponentReact 2019. 11. 21. 20:32
Poster.js import React from "react"; import PropTypes from "prop-types"; import { Link } from "react-router-dom"; import styled from "styled-components"; const Container = styled.div` font-size: 12px; `; const Image = styled.div` background-image: url(${props => props.bgUrl}); height: 180px; background-size: cover; border-radius: 4px; background-position: center center; transition: opacity 0.1s ..
-
Children이란?React 2019. 11. 19. 23:48
Section.js import React from "react"; import PropTypes from "prop-types"; import styled from "styled-components"; import Section from "Components/Section"; const Container = styled.div` padding: 0px 10px; `; const HomePresenter = ({ nowPlaying, popular, upcoming, loading, error }) => loading ? null : ( {nowPlaying && nowPlaying.length > 0 && ( {nowPlaying.map(movie => movie.title)} )} {upcoming ..
-
#6 PresentersReact 2019. 11. 19. 21:39
Presenter 구조 HomePresenter.js import React from "react"; import ProTypes from "prop-types"; import styled from "styled-components"; const HomePresenter = (nowPlaying, upComing, popular, error, loading) => null; HomePresenter.ProTypes = { nowPlaying: ProTypes.array, upComing: ProTypes.array, popular: ProTypes.array, error: ProTypes.string, loading: ProTypes.bool.isRequired }; export default HomeP..
-
191118~27_TILTIL(Today I learned) 2019. 11. 19. 00:18
11월18일(월) 리액트 멤버쉽 강의 세편이상 학습 생성자 ,super() 및 this활용등등..너무어렵다.익숙하지않은탓일까?.. 11월 19일(화) 하루 강의 세편이상 학습..실패 작심삼일도 못했다.입이 두개여도 할말이없다. 너무 복잡하고 어렵다. 이해도 잘 안되고.. 그래서 학습진도가 더디다. 11월 20일(수) 하루 강의 세편이상 학습. 성공! 실패는 성공의 어머니!? 여전히 리액트는 어렵고 힘들다.. 강의에서 나온 코드를 치며 이해하기에 급급하다보니 공부를 해도 한거같지가않다. 공부는 힘들고 고통스러우면 잘했다라고 한다던데.. 힘들고 고통스러웠으니까 오늘 공부는 괜찮게한걸까?.. 리액트 첼린지 어제와 그제는 실패했다. 내 실력에 슬럼프가 가당키나할까? 싶지만.. 어쨋든 슬럼프인건 분명하고 슬럼프에..
-
let으로 할당 제거(Destructuring assignment)React 2019. 11. 19. 00:02
Destructuring assignment이란 es6에 추가된 새로운 표현식이다. ({ data: result } = await moviesApi.movieDetail(parsedId)) ()한 이유(할당 제거): 니코왈:"const {data : result} = await .....를 수행하면 그런 다음 try {} 안에 'result'const를 생성했기 때문에 finally {}에서 'result'변수에 액세스하여 상태를 설정할 수 없습니다. {}" 내가 이해한 내용: finally{} 에서 result 변수에 접근 하기위해서 할당 제거를 사용했다 import React from "react"; import DetailPresenter from "./DetailPresenter"; import ..
-
20191118Again..TIL(Today I learned) 2019. 11. 18. 21:12
반성한다. 그리고 후회하고 이 구렁텅이에서 벗어나고싶다.. 리액트첼린지 시작되면 힘들어질꺼란 자기합리화로 공부를 등하시여기고 놀기바빴다. 한번 공부를 놓고 놀기 시작하니 끝이없었다. 오늘 실컷놀고 내일 공부하자라는 '미룸'이라는 눈덩이가 데굴데굴 굴러가 걷잡을수없이 커졌다. 그동안 쌓아놓은 습관 이랄까.. 루틴 이랄까?.. 모든게 깨졌다. 내가 '내가'아니가 되었다. 모든게 싫어졌고 모든걸 놓아버리고싶고 도망치고싶다. 여기서 한발자국 뒤로물러나 웅크리고 다시 일어서고싶은 마음이 굴뚝같다. 그런데.. 난 늘 그랬다. 늘 웅크리고 다시 일어서길 반복했다. 누구는 다시 일어설수있는 용기가 부럽다고 할 수도있겠지만 이건 용기가 아니다. '겁'이다.. 여러 외부적인 요소가 겁이나서 웅크렸고 이대론 안될거라는 위기..