Korean developer 개발일지25

.·2022년 6월 28일
0

Developer

목록 보기
25/60

0) 서문

오늘은 시험도 치르는 날이다보니 강의에 집중도 해야하고 중간 중간 쉬는시간에 월말평가 공부를 해야 했어서 쉽지 않은 날이 였다.

어찌 됐든 강의는 열심히 들었고 시험도 13점으로 무사히 잘 통과 되어서 큰 문제는 없었다. 다만 공부하는 시간도 있고 집중도 해야하다보니 이리저리 어려운 날이였다.

1) 학습한 내용

import React, {Component} from "react";

class Message extends Component{
render(){
const{lang} =this.props;
if(lang === "en")
return(

  <p>

  "Context provides a way to pass data through the component tree

  without having to pass props down manually at every level"

); 
else
return(
  <p>
    "컨텍스트는 모든 래밸에서 props 넘기지 않고도 컴포넌트 트리에 걸쳐서
    데이터를 전달할수 있는 방법을 제공한다"

  </p>

)

}

}

import React, {useContext} from "react";
import LangContext from "../LangContext";

function Button({lang, toggleLang}){
const lang = useContext(LangContext);
return{lang}
}

export default Button;

import React from "react";
import LangContext from "../LangContext";

function Title({lang}) {npx create-react-app projcom
return (
<LangContext.Consumer>
{lang => {
const text = lang === "en"? "Context" :"컨텍스트";
return

{text}

;
}}

</LangContext.Consumer>

)
}

export default Title;

2) 학습내용 중 어려웠던 점

오늘은 강의가 실습위주로 진행되어서 어려운것은 없었다.

3) 해결방법

4) 학습소감

시험도 안정적으로 통과하고 강의도 집중적으로 듣게되어서 마음이 편안한것 같다.

profile
벨로그

0개의 댓글

관련 채용 정보