-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suspense/Error boundary, spinner 구현 #52
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mingkyeongg
approved these changes
Nov 7, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
확인했습니다. 고생하셨습니다~
혹시 select에서 placeholder를 없앤 이유가 value값 문제 때문일까요??
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
변경점 👍
Suspense, ErrorBoundary에 대해
Suspense는
선언적
인 리액트의 특성에 맞춰 서버 요청, 데이터 fetch, 표시를 선언적으로 할 수 있도록 도와주는 컴포넌트입니다. React API의 일부이고, ErrorBoundary와의 결합을 통해 에러 및 데이터 로딩 처리를 간편하게 할 수 있습니다.사용하려면 react-query의 useSuspenseQuery 또는 useInfiniteQuery를 사용하는 컴포넌트를 로 감싸면 되는데요, 구글링해보시면 예제를 쉽게 찾으실 수 있습니다.
default Fallback UI를 사용하려면 제가 내부적으로 구현해놓은 SuspenseErrorBoundary를 사용하시면 됩니다.
다만, 이 블로그에 나온 내용을 유의하여 사용해주세요.