Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

rerender a vue component

<template>
    <component-to-re-render :key="componentKey" />
</template>

export default {
  data() {
    return {
      componentKey: 0
    }
  },
  methods: {
    forceRerender() {
      this.componentKey += 1
    }
  }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #rerender #vue #component
ADD COMMENT
Topic
Name
6+1 =