DEV Community

theCodingStoic
theCodingStoic

Posted on

4 1

TypeError: handler.apply is not a function

So, I am working my way through the VueJS guide using SFC's (I like to challenge myself). However, I have come across an issue in the List Rendering section. I have passed an array, items, from the vForArray component to the MutableArrayMethods component as a prop. In the MutableArrayMethods data, I have an array with information for buttons. While I am able to render both the items and buttons arrays the way that I want, I am not able to successfully run a method bound to the button. I have made sure that no names are repeated by adding a new property and matching the method names to that.

File tree to error:

components
->ListRendering
->vFor
->vForArray.vue (source of items prop)
->MutableArrayMethods.vue (unable to execute methods on button click)

https://codesandbox.io/embed/vueguideofficial-9ciyc

I appreciate any help. I also appreciate any general feedback on my code.

AWS GenAI LIVE image

Real challenges. Real solutions. Real talk.

From technical discussions to philosophical debates, AWS and AWS Partners examine the impact and evolution of gen AI.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay