Improve docs for async utils
What is your question:
I'm sorta ashamed to admit it, but it's unclear to me how to use the async utils based on the docs. I've had to dig around a lot to figure it out. Could there be a few code examples added to the docs?
Oh, and to be clear, the trouble is that I assumed that the async utils would be available as direct imports like they are in React Testing Library. Is there a reason they're not?
There is a code example in the async section but I'll admit it doesn't cover all of them and could be improved, especially as the only other reference for where to get them is merely implied by the heading hierarchy of the API reference.
I actually want to redo the docs as I feel the "story" it tries to tell as the hook requirements evolve actually just over-complicates the examples.
As for why it isn't a global import, the main reason is that unlike dom-testing-library we don't have a global object the keep track of the state of the hook (i.e., the DOM). In our world, the component with the state is only created when renderHook is called. We could have hoisted the component into the global space and made the utils work there too, but I worried that could impede concurrent testing (I may be off base on this) and was just additional effort I wanted to avoid. Honestly, I always found it a little jarring that they were global imports in RTL, but didn't take any context as to which render call I wanted to wait for.
I'm happy to consider moving them if a strong enough argument can be made.
I think simply adding some more complete examples to the API docs would be all that's needed.
Thanks for the input @kentcdodds, we'll look to improve the docs for this.