Skip to content

Async call in update function #58

Answered by ivanceras
fabuloso asked this question in Q&A
Discussion options

You must be logged in to vote

Hi,
There are 2 ways to do http call in sauron one is using the provide Http module as demonstrated in this example.

The other way is suited for your use-case which make use of reqwest and wasm-bindgen-futures.
Take a look at this hackernews-clone. This essentially spawns an aync function then wrap it in a Cmd

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@fabuloso
Comment options

Answer selected by fabuloso
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants