Skip to content

[Refactor] 블랙홀 계산기 atom 설정 #312

Description

@42sungwook

현재 블랙홀 계산식을 돌릴 때 atom을 두가지를 사용하여 usehook으로 제작한 상태인데
atom의 get함수를 사용하여 set하면서 계산식을 바로 돌릴 수 있는 방식으로 수정

  • jotai 의 atom 사용법 공부 참고
  • 불필요한 useEffect 삭제 (하단코드)
 //handleChange에서 updateSubjectList를 호출할 때 update되지 않는 문제
  useEffect(() => {
    updateSubjectList(subjectList);
    // eslint-disable-next-line react-hooks/exhaustive-deps
  }, [calculatorUserInfo]);
  • calculatorPropsAtom을 계산할 때 어떻게 전달받을지 고려

Activity

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

  • Status
    📋 Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions