리코일

    [리액트] Recoil - state management

    REDUX? or RECOIL? -> Nico said, "Everytime you learn or use libraries, framworks and other skills, You MUST know why you need and use those." Because those are built to sort out things. State management의 필요성? 다크모드, 유저의 로그인 여부 등 리액트 앱의 각종 state를 일일이 부모/자식 컴포넌트까지 argument로 전달해준다면 수많은 interface를 생성하고 반영해주어야함. => global state(atoms)를 사용하면 이를 해결할 수 있음! const isDark = useRecoilValue(isDarkAtom); const..