Vic on Nostr: I have a JSX file that exports a function. Inside of it I want to assign a variable ...
I have a JSX file that exports a function.
Inside of it I want to assign a variable the result of a async function.
I cant use await without being inside an async function, which the exported function isnt.
If I wrap inside an anonymous async, I can get the result, but the promise doesnt return until after its needed for that part of page.
How do I update the page afterwards with the results?
Inside of it I want to assign a variable the result of a async function.
I cant use await without being inside an async function, which the exported function isnt.
If I wrap inside an anonymous async, I can get the result, but the promise doesnt return until after its needed for that part of page.
How do I update the page afterwards with the results?