return axiosInst.post~~하는순간 res가 가는줄알았는데
then((res)=>{ 를 하면 res가 가는게아니고 then으로 들어간다
그래서 받는쪽에서 const res에는 undefined가 들어온다
즉 then((res)=> 를 쓰면 그안에서 return 값을 만들어줘야 받는쪽에서 받아서 쓸수있다.
'Spring' 카테고리의 다른 글
import 패키지가 안될때 ( 파일인식못함) (0) | 2023.04.27 |
---|---|
log.info("검색된 id: {}", id); (0) | 2023.04.27 |
@jsonIgnore의 문제점 (0) | 2023.04.27 |
@Lob과 columnDefinition = "TEXT" (0) | 2023.04.26 |
List<OrderInfo> findAllByMember_MemberIdOrderByOrderDateDesc(Long memberId); (0) | 2023.04.26 |