0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

TypeError: Cannot read property 'map' of undefined

Last updated at Posted at 2021-06-28

概要

Reactで書いたコードで↓のエラーが発生したので対処方法メモ
TypeError: Cannot read property 'map' of undefined

原因

mapメソッドを使っている配列にデータが入ってなかった

cost abc[] = fetch('https://abcdef.com/') <=データ取れてない
const abc.map(function(val){
    return val
})

##解決方法
APIのエンドポイントが間違っていたため、修正。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?