기술 스택

1. Recoil

사용 방법

1) state.js ⇒ 상태들을 저장, 관리한다.

import { atom } from "recoil";
// atom은 상태를 나타낸다.

export const textState = atom({
  key: "textState", // 
  default: "",
});

2) 사용될 컴포넌트

import { useRecoilState } from "recoil";
import { textState } from "./state";

const RecoilTest = () => {
  const [value, setValue] = useRecoilState(textState);

	// ...
}