Skip to content

Axios를 활용한 화면 렌더링 #13

@DeveloperRyou

Description

@DeveloperRyou

공식 홈페이지 : https://axios-http.com/kr/docs/intro
참고자료 : https://velog.io/@esthevely/JS-Axios-dummyAPI-%EC%9D%B4%EC%9A%A9%ED%95%B4%EC%84%9C-API-%ED%98%B8%EC%B6%9C%ED%95%B4%EB%B3%B4%EA%B8%B0

이해하셔야 할 기능, 용어 : Axios, useState, useEffect, Promise, await, async

받아와야 할 데이터 : https://jsonplaceholder.typicode.com/posts

그전 과제에서 게시판 형태의 UI를 구성하셨는데, 이번엔 임의 데이터가 아닌 서버에 올라가있는 데이터를 가져와서 렌더링 하겠습니다.
axios 의 get 메소드를 활용해서, JSON형태의 데이터를 받아와주세요.
데이터에는 title, body가 있습니다. 이를 이용해서 게시판 UI를 렌더링 해주세요.

useEffect, useState 훅을 사용해서 렌더링 할 데이터를 호출, 관리해주세요!

axios는 then, catch로 구성하셔도 되고, async await을 이용한 try catch 로 구성하셔도 됩니다!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions