리액트 19.2에서 새로 추가된 Activity 컴포넌트 #537
dev-hobin
started this conversation in
Today I Learned
Replies: 2 comments 1 reply
-
|
지나가다 남겨봅니다 오늘 있었던 키노트 영상을 보시면 좀더 도움이 되실 것 같아요. 네이밍 자체는 안드로이드의 Activites 의 영향을 받았다고 합니다 https://developer.android.com/guide/components/activities/intro-activities?hl=ko |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
확실히 css가 좀 아쉽긴하네요.. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
위의 코드 예시를 보며 왜 이런걸 만든거지? 별로인거 같은데?? 라는 생각이 먼저 들었다. 그래서 Activity 문서를 읽어봤고 나름 괜찮다는 생각을 했다.
프리패치 기능이 컴포넌트화 된 느낌이랄까?
이건 유지시켜주고 싶은 상태를 상위 컴포넌트에서 따로 관리하거나 상태를 끌어올려야할 필요를 없애준다.
사용자에게 그 비싼 과정을 기다리게 할 필요 없다.
좀 아쉬웠던건 hidden 모드일 때 display: none !important 로 css 를 건드리던데, 트랜지션을 줄 수가 없는게 아쉽다. (트랜지션 주는 방법은 있던데 ViewTransition 이라는 아직은 실험적인 컴포넌트와 함께 활용하면 줄 수 있다.)
Activity 는 적극적으로 사용되기 보다는 useDeferredValue, useTransition 처럼 성능 최적화를 위해 선택적으로 사용해야 하는 컴포넌트라고 생각했다.
Beta Was this translation helpful? Give feedback.
All reactions