layout 프로퍼티를 추가하면 자동으로 애니메이션이 동작합니다.Framer Motion 에 알려주면 자동으로 애니메이션이 동작합니다.layoutId 프로퍼티 사용function App() {
  const [clicked, setClicked] = useState(false);
  const toggleClicked = () => setClicked((prev) => !prev);
  return (
    <Wrapper onClick={toggleClicked}>
      <Box>
        {!clicked ? (
          <Circle style={{ borderRadius: 50 }} layoutId="circle" />
        ) : null}
      </Box>
      <Box>
        {clicked ? (
          <Circle style={{ borderRadius: 0, scale: 2 }} layoutId="circle" />
        ) : null}
      </Box>
    </Wrapper>
  );
}Framer Motion Docs
리액트 마스터클래스, 노마드코더