V
V
Veiwai2021-07-07 19:59:16
Vue.js
Veiwai, 2021-07-07 19:59:16

Why is the VUE prop not working?

A component has been created that should accept a prop, the prop has a default value.
When you try to pass true to the prop, nothing changes, the value also remains false. What can be wrong?
Tried not to set default value

Vue.component('configurator', {
    props: {
        isLoading: {
          default: false
        }
    },
    template: '<div>{{ isLoading }}</div>' // <- Тут false, а должно быть true
})


<configurator :isLoading="true"/>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Aetae, 2021-07-07
@Veiwai

Because :) <configurator :is-loading="true"/>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question