#nested async awaits; How to return?
10 messages · Page 1 of 1 (latest)
your getData should just return currentUser
if you want both to be returned you can return an object
return {currentUser, currentProfile}
then in the jsx you would access via currentUserResource().currentUser or currentUserResource().currentProfile
You must be thirsty today.
Oh, so one Resource can hold both datasets. Nice.
Guess I didn't read all the way through Chat's answer, as I was distracted by the (!response1.ok) (would .ok work instead of .error)
In my getData() does anyone see recursion? Im' getting an error in the console (not affecting the rendering or functionality of the page as far as I can tell). I'm guessing the function as the error says Uncaught (in promise) InternalError: too much recursion and that's the only place I have a promise in this component. Thanks again.
In a completely different app, I've also run into this. Not sure why, but my app works regardless.
This is probably due to us misusing solid in some way