• +91 9723535972
  • info@interviewmaterial.com

Vue JS Interview Questions and Answers

Question - What is the purpose of renderError?

Answer -

When the default render function encounters an error then you can use rennderError as an alternative render output. The error will be passed to renderError as the second argument.

The example usage of renderError is as below,

new Vue({
  render (h) {
    throw new Error('An error')
  },
  renderError (h, err) {
    return h('div', { style: { color: 'red' }}, err.stack)
  }
}).$mount('#app')

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners