내장 React API
- actlets you wrap renders and interactions in tests to ensure updates have processed before making assertions.
- cache를 통해 가져온 데이터나 연산의 결과를 캐싱합니다.
- createContextlets you define and provide context to the child components. Used with- useContext.
- lazylets you defer loading a component’s code until it’s rendered for the first time.
- memolets your component skip re-renders with same props. Used with- useMemoand- useCallback.
- startTransitionlets you mark a state update as non-urgent. Similar to- useTransition.
- use는 Promise나 Context와 같은 데이터를 참조하는 React Hook입니다.
Resource APIs
Resource를 State의 일부로 포함하지 않고도 컴포넌트에서 Resource에 액세스할 수 있습니다. 예를 들어, 컴포넌트는 Promise에서 메시지를 읽거나 Context에서 스타일 정보를 읽을 수 있습니다.
Resource에서 값을 읽으려면 다음 API를 사용하세요.
function MessageComponent({ messagePromise }) {
  const message = use(messagePromise);
  const theme = use(ThemeContext);
  // ...
}