Skip to content

Conversation

@mywnajsldkf
Copy link
Collaborator

No description provided.

@mywnajsldkf mywnajsldkf changed the title my-first-merge my-first-Pull request Feb 14, 2020
Copy link

@leaf-upper leaf-upper left a comment

Choose a reason for hiding this comment

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

고생많이하셨습니다 !!

case 'add ':
return(result: left + right);
default:
return state;

Choose a reason for hiding this comment

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

함수의 결과로 연산의 결과 값을 반환하는것 같은데 만약 연산의 오류로 default값에 switch문이 들어가서
state를 return하게 되면 어떻게 되나요? 원래 state를 반환해야하는것인지 아니면 그렇게쓰신 의미가 있는지 궁금합니다!

const TodoListItem = ({ todo }) => {
const { text, checked } = todo;
return (
<div className="TodoListItem">

Choose a reason for hiding this comment

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

div 에서 속성값으로 class가 아닌 className을 주는게 리액트의 방식인가요? 오늘 스터디에서 말하셨던 내용이 맞는지 궁금합니다

Choose a reason for hiding this comment

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

클래스형 컴포넌트는 state 기능 및 라이프 사이클 기능을 사용할 수 있다고 적혀있고 Hooks 또한 그렇다고 적혀있습니다.그렇다면 Hooks와 클래스형 컴포넌트 사이에서 어떤것을 사용하는게 더 좋을지 궁금합니다. 또는 서로의 장단점을 알려주세요

Choose a reason for hiding this comment

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

아까 질문드렸었던 내용인데 클래스형 컴포넌트보다 함수형 컴포넌트와 Hooks를 왜 더 권장하는지 궁금합니다!

Copy link

@Tetramad Tetramad left a comment

Choose a reason for hiding this comment

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

react 2개는 너무 볼 게 많아서 중간부터 정신줄 놓고 본 듯 하네요 ㅠㅠ

// action.type에 따라서 수행
switch(action.type){
case 'divide':
return(result: left / right);

Choose a reason for hiding this comment

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

result: 가 어떤 역할을 하는 문법인지 궁금합니다.

import TodoList from './components/TodoList';

const App = () => {
const [todos, setTodos] = useState([

Choose a reason for hiding this comment

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

setTodos 변수는 안 쓰고 있어요

const [value, setValue] = useState('');
const onChange = useCallback(e => {
setValue(e.target.value);
// console.log(e.target.value);

Choose a reason for hiding this comment

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

//??

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.

3 participants