Skip to content

Instantly share code, notes, and snippets.

@techomoro
Created November 13, 2021 04:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save techomoro/4b8321cb779930219c613e3645d3c1fe to your computer and use it in GitHub Desktop.
Save techomoro/4b8321cb779930219c613e3645d3c1fe to your computer and use it in GitHub Desktop.
import React from "react";
import { useRecoilValue } from "recoil";
import { lengthState } from "../selectors/name";
export default function LengthComponent() {
const length = useRecoilValue(lengthState);
return <h3 className="length">{length}</h3>;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment