Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examples in Reflex.Time documentation #513

Open
sboosali opened this issue Nov 1, 2024 · 0 comments
Open

Examples in Reflex.Time documentation #513

sboosali opened this issue Nov 1, 2024 · 0 comments

Comments

@sboosali
Copy link

sboosali commented Nov 1, 2024

For example, with relevant and distinct use cases (but stubbed out for clarity, as sortableList does), something like:

do
  eQuery_Delayed <- delay 2 (updated dQuery)

  dResults <- holdDyn [] (eQuery_Delayed <&> (_searchQuery . _parseQuery))

  
do
  eRequest_Throttled <- throttle 1 eRequest

  eResponse <- performEventAsync $
    eRequest_Throttled <&> (\request handle -> liftIO $ do
      response <- _send request
      handle response)
  
do
  eEdits_Batched <- batchOccurrences 5 eEdit

  eResult <- performEvent $
    eEdits_Batched <&> (\edits ->
      _commit (toList edits))
  
do
  e_Debounced <- debounce 0.001 e
    -- within a millsecond.

  

https://hackage.haskell.org/package/reflex-0.9.3.1/docs/Reflex-Time.html

@sboosali sboosali changed the title Examples for Reflex.Time documentation Examples in Reflex.Time documentation Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant