Skip to content

Instantly share code, notes, and snippets.

@jonasdw
Last active December 11, 2018 09:52
Show Gist options
  • Save jonasdw/aaed018b31f9790c9767da63b178b37b to your computer and use it in GitHub Desktop.
Save jonasdw/aaed018b31f9790c9767da63b178b37b to your computer and use it in GitHub Desktop.

Response type of fetchAs https://github.com/fable-compiler/fable-powerpack/blob/master/src/Fetch.fs#L359

Response type of put https://github.com/fable-compiler/fable-powerpack/blob/master/src/Fetch.fs#L401

Wanneer ik een Msg as Success wil toevoegen:

Cmd.ofPromise
        (Fable.PowerPack.Fetch.putRecord "geplande-diensten" req)
        []
        DienstToegevoegd

This expression was expected to have type 'Fable.PowerPack.Fetch.Fetch_types.Response -> 'a' but here has type 'Msg'

Wanneer ik een Msg wrap in een functie krijg ik geen errors, maar wordt DienstToegevoegd niet "gedispatched"

Cmd.ofPromise
        (Fable.PowerPack.Fetch.putRecord "geplande-diensten" req)
        []
        (fun _ -> DienstToegevoegd)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment