Get terms of a taxonomy using useSelect

I’m developing a Gutenberg block and I need to show a dropdown with all the terms of a custom taxonomy in it. I’m using the useSelect hook for retrieving this data, but it’s not working because it gets stuck showing the Loading... message and there are no errors in the console. I registered the taxonomy with the show_in_rest arg set to true.