0

I'm following along this tutorial and for some reason I am getting a "maximum call stack error"

<template>
  <SearchInput></SearchInput>
</template>

<script>

import SearchInput from './components/SearchInput.vue'
export default {
  name: 'App',
  components:{
    SearchInput
  }

};
</script>

SearchInput.vue component file:

<template>
<SearchInput> 
    <input type="text">
</SearchInput>
</template>


<script>
export default {
    name: "SearchInput",
}
</script>

I tried giving the SearchInput its own name "SearchInputView": SearchInput but it didn't work. I'm using es6 syntax and this is a Vue 2 project. What am I doing wrong?

1 Answer 1

7

Remove <SearchInput> tag from the component itself

Your SearchInput component's template should look like this.

SearchInput.vue

<template> 
    <input type="text">
</template>

You had the component itself being mounted inside itself, which resulted in a "maximum call stack error"

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.