I'm attempting to output the wishlist block as an ajax request. I've attempted to do it in the controller using
$block = $resultPage->getLayout() ->createBlock('Magento\Wishlist\Block\Customer\Wishlist','miniwishlist') ->setTemplate('Company_Module::miniwishlist.phtml') ->toHtml();
But as the block contains several child blocks and I didn't have any success in using the setChild method programmatically.
I want to return only the block and nothing else. How can I achieve that?