Get .map is not function İssue And Solving About (Redux)

if response is like that
{
  • data
    {
    • id1,
    • name"Adana",
    • Ads
      [
      • {
        • id1,
        • user_id12,
        • title"deneme",
        • desc"deneme",
        • condition5,
        • view0,
        • swapCount0,
        • state_id1,
        • city_id1,
        • category_id50,
        • created_atnull,
        • updated_atnull
        },
      • {
        • id2,
        • user_id5,
        • title"dede",
        • desc"edede",
        • condition5,
        • view0,
        • swapCount0,
        • state_id1,
        • city_id2,
        • category_id51,
        • created_atnull,
        • updated_atnull
        },

 You must define reducer's initial state is state={}

or
{
  • data
    [
    • {
      • id50,
      • name"Cep telefonu",
      • pic_url"fa fa-mobile"
      },
    • {
      • id51,
      • name"Elektronik",
      • pic_url"fa fa-laptop"
      },
    • {
      • id52,
      • name"Araba",
      • pic_url"fa fa-car"
      },
    • {
      • id53,
      • name"Bisiklet",
      • pic_url"fa fa-motorcycle"
      },

Your initial state  must be state=[]

Yorumlar

Bu blogdaki popüler yayınlar

Laravel & React 1

React ile Kişisel Blog Sayfası Oluşturma 1

Github' a proje atma (Visual Studio Code ile)