-
Notifications
You must be signed in to change notification settings - Fork 28
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
[Mission5/이범진] Project_Notion_VanillaJs 과제 #57
base: main
Are you sure you want to change the base?
Conversation
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.
코드 작성하느라 수고하셨습니다. 다음 과제도 화이팅입니다! 💪
if(timer !== null){ | ||
clearTimeout(timer) | ||
} | ||
|
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.
디바운싱이 적용된 점이 인상깊네요! 저는 나중에 쓰로틀링 직접 적용해보고 싶어요 👍
try{ | ||
const res = await fetch(`${API_END_POINT}${url}`,{ | ||
...options, | ||
headers:{ |
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.
request로 반복되는 API 요청을 일반화 시키는 부분이 인상적이네요! 👍
|
||
export const removeItem = (key) => { | ||
storage.removeItem(key) | ||
} |
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.
localStorage 관련된 모든 함수를 한 곳에 모아두어서 보기 편한거 같아요 😄
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.
고생하셨습니다.
|
||
this.render() | ||
|
||
editor.setState(this.state.post ?? { |
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.
??를 통해서 코드가 깔끔해지네요!
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.
안녕하세요 범진님! 과제하느라 수고 많으셨습니다 👍
+) 메인 브랜치로 PR 올리셨어요!
const $target = document.querySelector('#app') | ||
|
||
new App({$target}) | ||
console.log() |
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.
👀
export const request = async (url,options ={})=>{ | ||
try{ | ||
const res = await fetch(`${API_END_POINT}${url}`,{ | ||
...options, | ||
headers:{ | ||
'Content-Type':'application/json', | ||
} | ||
}) |
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.
options에 headers가 있다면 어떻게 될까요?
|
||
const fetchPosts = async () => { | ||
const posts = await request('posts') | ||
console.log("posts",posts) |
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.
운영 환경에서 로그 데이터가 사용자에게 노출되는 상황이 바람직한 상황은 아닙니다.
구현다 못했습니다.. ㅠㅠ
📌 과제 설명
👩💻 요구 사항과 구현 내용
✅ 피드백 반영사항
✅ PR 포인트 & 궁금한 점