Line 0: Parsing error: Cannot read property 'map' of undefined

前端 未结 11 1626
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-30 18:49

Currently starting up the server on my client side, the error above is what I have been getting. I am using Typescript, React, ESlint. I can\'t seem to go forward since th

11条回答
  •  醉话见心
    2020-12-30 19:08

    Try playing around with variable types inside the interfaces. E. g I've got this error when I had such state interface:

    interface State{
        foo: []
    }
    

    but when I've changed the type of array it worked:

    interface State{
        foo: string[]
    }
    

提交回复
热议问题