According to the Docs, https://recoiljs.org/docs/api-reference/core/RecoilRoot
<RecoilRoot> accept props as initializeState?: (MutableSnapshot => void) signature.
That able to initialize Recoil State so I want to use this props but I don't understand how to make MutableSnapshot object.
import {RecoilRoot} from 'recoil';
function AppRoot() {
return (
<RecoilRoot initializeState={/* How to setup arguments here? */} >
<ComponentThatUsesRecoil />
</RecoilRoot>
);
}
On the other hand Snapshot is easier to get from useRecoilSnapshot() though.