How to render WordPress menu items without a custom Walker

In recent work where I've been using tailwindcss to build my UI, I've come up against the challenge of dealing with WordPress' default menu markup.

A possible solution here could be to write a custom walker class but, for a simpler solution, the following code snippet got me where I needed to be with less headache: