# 1일

## Project&#x20;

### **react-redux 적용**&#x20;

&#x20;상태관리를 위해 react-redux를 적용한다. 어렵다는 이유로 슬금슬금 피하기만 했는데 이젠 피할 수 없게 되었다. 왜냐하면 input 작업 시 유효성 검사에 관련된 상태, value 상태 등 상태 변화가 자주 일어나며 상태 업데이트를 해야 하는데 생각보다 규모가 커지고(내 기준) 복잡해진다. 결국 useState로 사용하던 상태 관리를 접고?! react-redux로 갈아탄다. \
결국, 필요하다고 생각해야 한다. 그리고 이렇게 경험해야 왜 그것을 사용해야 하는지 알 것 같다.&#x20;

### **storybook**&#x20;

storybook에서 react-redux를 사용하니 계속 오류가 뜬다. 왜 이럴까?&#x20;

> storybook에서는 동적으로 변경되는 자료를 처리하려면 [목(Mock) 자료인 일종의 가짜 자료를 만들어 테스트해야 한다.](https://storybook.js.org/tutorials/intro-to-storybook/react/ko/data/) 여기서 말하는 동적으로 변경된다는 말은 context API, redux 등을 말한다.&#x20;

그래서 일단 따로 테스트 작업을 하지 않으면 사용할 수 없다. 결국 CRA 환경에서 확인하면서 작업을 진행한다.&#x20;

### **input은 너무 어려워**&#x20;

&#x20;야심 차게 input 상태관리를 react-redux로 한다고 했으나 작업이 쉽지 않다. 오늘 온종일 그 부분에 매달려서 씨름을 했다. 도대체 왜 이러는 걸까?&#x20;

먼저 inputslice의 기본 상태 값을 바인딩하는 것은 성공했으나 상태 업데이트가 안 된다. 이 부분의 원인을 찾으려 코드를 지워보고 다시 해보고 수정해보고 등등 몇 시간의 사투를 벌였으나 성공하지 못했다.&#x20;

## Algorithm&#x20;

오늘부터 알고리즘 문제를 풀기 시작한다. Node.js 환경에서 하려다 보니 Node.js의 기본 입출력하는 방법을 몰라서 한참을 헤맸다.&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://shhn0509.gitbook.io/hanna/hanna-log/4/1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
