reflex-realworld-example icon indicating copy to clipboard operation
reflex-realworld-example copied to clipboard

lots of boilerplate for servant-reflex client

Open rubenmoor opened this issue 3 years ago • 1 comments

From what I understand, this project uses servant-reflex for a type-safe client, which is great. The price for this seems to be quite a bit of boilerplate for every single api request. Is this some irreducible complexity there?

rubenmoor avatar Mar 25 '21 16:03 rubenmoor

Using prerender works:

prerender_ (text "") $ do
    res <- lift $ someAutoGeneratedRequest -- ...
    -- ...
    

For my intents and purposes, this is a solution. I am not quite sure in how far I am limiting myself now - effectively allowing requests only once the Javascript frontend has loaded.

rubenmoor avatar Mar 25 '21 18:03 rubenmoor