Skip to content
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

["clo-or”] "front-end” 2주차 미션 제출합니다. #1

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

clo-or
Copy link

@clo-or clo-or commented Nov 25, 2024

No description provided.

Copy link
Collaborator

@hhhkdev hhhkdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

가장 먼저 미션을 마무리하시다니 대단하시네여 시간이 많진 않겠지만 프로젝트 이것저것 건드려보고 추가 미션도 진행해보면 더 빠르게 성장할 수 있을 거 같습니당 수고하셨어요~

}
const data = await response.json();

data.forEach(post => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

forEach를 사용하여 처리한거 굉장히 마음에 드네요. 단순히 for문을 사용하는거보다 더 코드가 직관적이고 효율적이네요.

Comment on lines +1 to +7
async function fetchAndPrintTitles() {
try {
const response = await fetch('https://jsonplaceholder.typicode.com/posts/');
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
const data = await response.json();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

코드가 굉장히 깔끔하고 에러처리까지 챙겨야 할 내용을 모두 챙겼네용 멋집니다

Comment on lines +1 to +14

button {
background-color: #007bff;
padding: 10px 20px;
margin: 10px;
color: white;
border: none;
border-radius: 5px;
font-size: 20px;
}
*{
padding: 5px;
margin: 5px;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

전반적으로 띄어쓰기 간격이 일정하지 않은거 같아요. VS Code에서 Prettier와 관련한 설정을 찾아보고 적용한다면 저장만 해도 코드 포맷이 적용되는 모습을 볼 수 있습니당


const App = () => {
return (
<Router>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BrowserRouter가 없길래 찾아보니 as를 이용해서 Router로 가져왔었네여 해당 로 감싸는 걸 App.js가 아니라, index.js에서 App태그를 감싸서 이용할 수도 있습니다!

Comment on lines +9 to +10
<button onClick={() => navigate('/velog')}>velog</button>
<button onClick={() => navigate('/picture')}>picture</button>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

명세에 적어놓은 내용은 태그를 이용하여 이동하는 걸 생각했었는데 다른 방식이네여 하지만 useNavigate 사용 방식을 알아낸 듯하니 다행입니당

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants