Skip to content

Instantly share code, notes, and snippets.

@benkolera
Created June 19, 2019 20:17
Show Gist options
  • Save benkolera/977c296b2297c67de7076949b74d92f2 to your computer and use it in GitHub Desktop.
Save benkolera/977c296b2297c67de7076949b74d92f2 to your computer and use it in GitHub Desktop.
frontend :: Frontend (R FrontendRoute)
frontend = Frontend
{ _frontend_head = el "title" $ text "Obelisk Minimal Example"
, _frontend_body = prerender_ blank $ do
i <- inputElement def
t <- throttle 2 (_inputElement_input i)
d <- debounce 2 (_inputElement_input i)
tD <- holdDyn "" t
dD <- holdDyn "" d
text "throttled("
dynText tD
text " ) debounced("
dynText dD
text ")"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment