-
Notifications
You must be signed in to change notification settings - Fork 0
[REFACTOR] 퀴즈 등록 모달 메타 로드를 useEffect 페칭→useTransition으로 개선 #872 #925
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
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.
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.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: Hard-Click/Hard-Click-FrontEnd
Length of output: 528
🏁 Script executed:
Repository: Hard-Click/Hard-Click-FrontEnd
Length of output: 3398
🌐 Web query:
React useTransition async callback pending promise ignored startTransition docs💡 Result:
In React 19 and later, the
useTransitionhook has been improved to automatically handle state updates that occur after anawaitwithin an async transition [1]. If you are using thestartTransitionfunction returned byuseTransition, you no longer need to manually wrap state updates that follow an asynchronous request in an additionalstartTransitioncall [1]. These updates are automatically included in the transition [1]. However, this improvement applies specifically to thestartTransitionprovided by theuseTransitionhook [1]. If you are using the standaloneReact.startTransitionfunction (often used outside of components or whereuseTransitionis unavailable), you must still manually wrap any state updates that occur after anawaitin a newstartTransitioncall [2][1]. The requirement to wrap updates in earlier versions of React or when using standalonestartTransitionarises because React loses the asynchronous context when anawaitexpression is encountered [3]. Without this context, React cannot automatically associate subsequent state updates with the original transition, causing them to be treated as standard, urgent updates instead of non-blocking transitions [4][3]. Summary of Behavior: 1. useTransition.startTransition: Supports async functions natively. State updates after await are automatically part of the transition [1]. 2. React.startTransition (standalone): Does not automatically track context after await. State updates after await must be wrapped in another startTransition [2][1]. If you find that your state updates after an await are not being treated as transitions, ensure you are utilizing thestartTransitionreturned byuseTransitionand check that you are not accidentally relying on the standalone version [2][1].Citations:
로딩 상태를 현재 요청 기준으로 분리하세요.
isMetaPending만 쓰면 이전 강의의 느린 요청이 끝날 때까지 주차 선택이 계속 비활성화됩니다.reqId로 현재 요청의 pending을 따로 추적하고, 해당 요청이 끝날 때만 로딩을 해제하세요.🤖 Prompt for AI Agents