map() was being called on. The lesson learnt? Dont take other people word for it that their code works! When I mock the data it works perfectly, but when I make an ajax call to get the exact same data it gives me undefined is not a function (evaluating this.state.list.map()).admin. Related Posts. What is the difference between owner and parent component in React.