I have around a hundred different components representing a specific record. These components are being displayed on a timeline with "load more functionality". What I have right now looks like this:
<template>
<div>
<template v-for="record in records">
<record-component-1 v-if="record.type === 'rec1'"></record-component-1>
<record-component-2 v-if="record.type === 'rec2'"></record-component-2>
<record-component-3 v-if="record.type === 'rec3'"></record-component-3>
<!-- so on -->
<record-component-100 v-if="record.type === 'rec100'"></record-component-100>
</template>
</div>
</template>
As the pagination goes, the memory consumption is also going up very fast. Up to 2GB until the browser crashes.
I tried to do some research but I can't find a solution that's similar from my design.
Perhaps there are solutions that would cater this kind of problem.
Any input would be much appreciated. Thanks.