Skip to content

Instantly share code, notes, and snippets.

@ozcanzaferayan
Created May 19, 2020 16:08
Show Gist options
  • Save ozcanzaferayan/0d0749428d100016ee5a2f79417349c7 to your computer and use it in GitHub Desktop.
Save ozcanzaferayan/0d0749428d100016ee5a2f79417349c7 to your computer and use it in GitHub Desktop.
import React from "react";
import { useRecoilValue } from "recoil";
import { currentUserNameQuery } from "../state/selectors";
export function UserInfo() {
const userName = useRecoilValue(currentUserNameQuery);
return <div>{userName}</div>;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment