question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Doesn't find component methods on Vue2

See original GitHub issue

When trying out Voalr on a Vue2 project, I regularly get Cannot find name 'someFunction' whenever anything under methods: {} is referenced in the template.

image

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
yaegassycommented, Mar 1, 2022

If you install @vue/composition-api and use the defineComponent, you can write in the option api style. setup option is also available. https://github.com/vuejs/composition-api

<script lang="ts">
import { defineComponent } from "@vue/composition-api";

export default defineComponent({
  // setup, components, data, computed, methods and more option
});
</script>
0reactions
johnsoncodehkcommented, Mar 2, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

Vue 2: Unable to find method on click event from component
It seems that the button from the component can't find the addBoard method, which is written in the same file! What i am...
Read more >
Why Your Vue Component Isn't Updating (and how to fix it)
1. Check that variables are reactive · 2. Make sure to update Arrays and Objects correctly (only in Vue 2) · 3. Use...
Read more >
Finding elements and components - Vue Testing Handbook
Finding Elements. vue-test-utils provides a number of ways to find and assert the presence of html elements or other Vue components using ...
Read more >
Components Basics - Vue.js
Components allow us to split the UI into independent and reusable pieces, and think about each piece in isolation. It's common for an...
Read more >
Creating our first Vue component - Learn web development
Using TodoItem inside our app · Open up App.vue again. · At the top of your <script> tag, add the following to import...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found