:datastar-script is replaced by :datastar-urlBREAKING: create-handler no longer takes hiccup for the Datastar script
tag. Pass the URL of Datastar's ES module bundle instead. Hyper adds the tag
itself and imports Datastar from the same URL to register its action.
;; before
(h/create-handler routes
:datastar-script [:script {:type "module" :src "/js/datastar.js"}])
;; after
(h/create-handler routes
:datastar-url "/js/datastar.js")
:datastar-script now throws when the handler is created.nil.hyper.server/default-datastar-script is replaced by
hyper.server/default-datastar-url.If you did not set :datastar-script, nothing changes.
BREAKING: actions no longer use one Datastar @post each. They go through
@hyperAction, which posts a tab's actions to /hyper/actions?tab-id=…. The
server runs them one at a time, in the order they were made, each against the
render it was made on. See How actions run.
/hyper/actions?action-id=….window.hyper.encodeClientParams and hyper.actions/execute-action! are
removed.h/spawn!.h/expr, with a
bundle served by Hyper. Use :tree-shake? for smaller bundles that only ship
the code your components and expressions depend on.:datastar-url.:source-map? option for create-handler to
generate source maps.navigating?* signal to know when a route is changing.h/reactive and
h/async.:param-transformer - Option for create-handler that controls how route
parameters are read from URLs and written back into links. Defaults to
Malli's string transformer.h/route - Works inside actions, and reflects route changes made earlier in
the same action.h/spawn! - Calling it from an action now starts a new worker every time.h/expr forms no longer
cause a syntax error.h/expr - =, str and boolean operators now compile correctly.server/start! - The :stop-timeout-ms option is now respected.connection* - Now set correctly on page load.DEPRECATION: You should no longer require hyper.protocols or hyper.client-params directly.
Maps the following into hyper.core directly:
action-name — wraps context/*action-name*route — wraps (:hyper/route *request*)Watchable — re-export of hyper.protocols/Watchableclient-param — re-export of hyper.client-params/client-param multimethodInitial public release.
Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |