最終更新:2023-07-21 (金) 05:27:31 (301d)  

recoil/useRecoilState
Top / recoil / useRecoilState

Returns a tuple where the first element is the value of state and the second element is a setter function that will update the value of the given state when called.

https://recoiljs.org/docs/api-reference/core/useRecoilState/

useRecoilState(atom)
const [tempC, setTempC] = useRecoilState(tempCelsius);

関連

  • recoil/useRecoilValue?