[Q&A] On-Demand ISR 구현 중 질문#137
Open
cskime wants to merge 3 commits intocodeit-bootcamp-frontend:Next-김참솔from
Hidden character warning
The head ref may contain hidden characters: "Next-\uae40\ucc38\uc194-sprint10"
Open
[Q&A] On-Demand ISR 구현 중 질문#137cskime wants to merge 3 commits intocodeit-bootcamp-frontend:Next-김참솔from
cskime wants to merge 3 commits intocodeit-bootcamp-frontend:Next-김참솔from
Conversation
…데 정렬 `field-sizing`은 비표준 속성으로 지원하지 않는 브라우저가 있으므로 사용하지 않습니다.
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
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.
문제 상황
/item/:idpage에서 '수정하기' 버튼을 클릭하면PATCH /items/:idAPI를 호출합니다./및/items/:idpage에 대해/api/revalidateAPI를 호출해서 page를 재생성 합니다./)에 반영됩니다.관련 코드
/pages/api/revalidate/index.ts: POST 요청의 body에 전달된 path들에 대해res.revalidate()를 각각 호출하여 해당 page를 재생성 하도록 구현했습니다./pages/items/[id]/index.tsx: Item detail page 입니다.Page컴포넌트 함수의handleEditClickcallback 함수에서,await editTodo()함수를 호출해서 데이터 수정 요청을 보내고,await revalidate()함수를 호출해서 page를 재생성한 뒤,router.push("/")를 호출해서 home page로 이동합니다./pages/index.tsx: Home page 입니다.