How to cache canvas shapes with Vue

If you want to cache a node in vue app, you need to have an access to Konva node and use node.cache() function.

To get an access to a node you can use references and component.getNode() method:

Instruction: try to drag whole stage. Then try again with cached group.

You should see much better performance.

// in template:
<v-group ref="group">
// later in the code:
Enjoying Konva? Please consider to support the project.