Can I set the default value of a Recoil atom to be an object?
e.g.:
export const currentUserState = atom({
key: 'currentUserState',
default: { name: '', email: '', userId: null },
});
And then set it with:
import { currentUserState } from '../atoms/atoms';
const setUserState = useSetRecoilState(currentUserState);
setUserState(name: 'John', email: '[email protected]', userId: getRand());