Barrie was very perspicacious in noticing many aspects of children's mental development decades before they were studied by cognitive psychologists.
There is a slight romantic aspect to the story, which is sometimes played down or omitted completely.