https://so-so.dev/react/import-react-from-react/

새로운 형태

import React from 'react';

function App() {
  return <h1>Hello World</h1>;
}
import React from 'react';

function App() {
  return React.createElement('h1', null, 'Hello world');
}

기존의 위 JSX → React.createElement 방식은 2가지 문제가 있다.

  1. React를 참조하기 때문에, 코드에 import React from 'react' 구문이 반드시 있어야 한다.
  2. 성능과 기술부채 등 많은 제약이 있다. (RFC 문서에서 자세히 다루고 있다고한다... 응?)