Implement a component that uses v-once or a memoization technique to optimize rendering for a static list item.
Code Playground
JavaScript (V8)
Loading...
Console Output
// Output will appear here...
// For React: ReactDOM.createRoot(rootElement).render(<App />);
// For React: ReactDOM.createRoot(rootElement).render(<App />);
Recommended Answer
<template>
<p v-once>This will never change: {{ message }}</p>
</template>
<script setup>
import { ref } from 'vue';
const message = ref('Initial message');
</script>