2. RecoilRoot
atom()
의 컨텍스트를 제공하는 Provider 입니다. Recoil 의 hooks 를 사용하는 모든 컴포넌트의 최상위 컴포넌트에 선언되어야 합니다.
import React from 'react';
import { RecoilRoot } from 'recoil';
function App() {
return (
<RecoilRoot>
Hello Recoil !
</RecoilRoot>
);
}
export default App;
Last updated
Was this helpful?