I am calling below code in my addtocart.phtml to get cart item data
<?php echo $this->getLayout()->createBlock("Magento\Checkout\Block\Cart\Item\Renderer")->setTemplate("Magento_Checkout::cart/item/default_custom.phtml")->toHtml(); ?>
but it returns null array.Please let me know why this code is not working.