일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
- bit
- Callback
- count
- nodeJS
- c++
- MySQL
- priority_queue
- component
- axios
- leetcode
- map
- React
- routes
- queue
- node.js
- BinaryTree
- event
- Context
- Props
- 비트연산
- array
- route
- server
- css
- JSX
- treenode
- DP
- state
- UE5
- Navigation
- Today
- Total
목록axios (2)
우사미 코딩
axios설치하고 이제 CRUD요청하는 부분을 다 api사용하게 바꿀거임 리액트는 그냥 데이터만 표현한다구 그랬쪄? ajax같이 통신하는 부분은 axios를 사용합시더 axios 설치는 검색 ㄱ 1. App.js const createBook = (title) => { // console.log('need to add book with : ', title); setBooks([...books, { id:Math.round(Math.random()*9999), title : title }]); }; 이제 이걸 json 서버에 요청하는걸러 바꿀거임 const createBook = async(title) => { const response = await axios.post('http://localhost:3..

Axios는 Ajax같은 자바스크립트 라이브러리임 우리는 axios는 terminal에서 설치하면된다 프로젝트 경로로 들어가서 터미널에서 명령어 입력 npm install axios 설치하면 node_module 폴더에 추가되고 어쩌고저쩌고 warning 메세지가 뜨는데 앱은 실행됨 Unsplash API를 사용할건데 이건 파라미터로 단어 넘기면 이미지를 리턴해주는 라이브러리임 https://unsplash.com/documentation#location https://unsplash.com/documentation#search-photos Unsplash API Documentation | Free HD Photo API | Unsplash Getting started This document desc..