docs icon indicating copy to clipboard operation
docs copied to clipboard

Code examples should include which libraries they are using

Open inputusernamehere opened this issue 4 years ago • 0 comments

For example on the bottom of this page: https://safe-stack.github.io/docs/recipes/client-server/messaging/

There is the following snipper:

let loadCustomer customerId =
    let loadCustomer () = Fetch.get<unit, Customer> (sprintf "/api/customer/%i" customerId)
    Cmd.OfPromise.perform loadCustomer () CustomerLoaded

But since there is no mention of where Fetch.get comes from, it's not usable as a stand-alone example. It needs more context.

After a bit of googling I think I found the library that seems to have the same syntax: Thoth.Fetch. A mention of this library's name, how to add it to the tempalte, and/or a link to its documentation would greatly improve this part of the SAFE documentation.

There might also be some other parts of the documentation that could be improved by adding more references to the libraries they depend on.

Thoth.Fetch here: https://safe-stack.github.io/docs/recipes/client-server/messaging-post/ Elmish and Feliz here: https://safe-stack.github.io/docs/recipes/client-server/mvu-roundtrip/

That's all I could find.

inputusernamehere avatar Aug 18 '21 17:08 inputusernamehere