I was previously using v1 with Macy.js, working as expected based on Solutions in this forum, however I cannot get v2 infinite load to work with Macy.js
Has anyone successfully implemented this? I am using List Load using the most basic recommended setup, and attempting to use latest Macy.js:
Hey @nroubal! The Attributes API was updated for v2. I am sharing an example below, the approach is the same as before, start and init Macy, and then recalculate Macy inside the render hook.
<script>
window.FinsweetAttributes = window.FinsweetAttributes || [];
window.FinsweetAttributes.push([
'list',
(listInstances) => {
console.log('List Successfully loaded!');
const [listInstance] = listInstances;
// define your Macy instance here
listInstance.addHook('render', () => {
// restart Macy the same way you did in v1
});
},
]);
</script>
I am attaching the new API documentation in case you want to give it a read