com.github.avanelsas/barebuild is unchanged, so nothing moves for a consumer. Release tags are vX.Y.Z rather than barebuild-vX.Y.Z.:cause rather than under :failure. A consumer branching on the tag reads (:cause failure).:on-failure, :on-pending and :on-writing take (child view this) as :render already did, and :on-connect takes (child this). A hook's slice decides only when it fires, never what it may read.:render was the only one that used to get that first call, so write your hooks to be idempotent.:observed-attributes is gone from the register! config. A consumer drives its child from the view alone, so it observes none.decorator/install! and recorder/install!, replacing set-request-decorator! and set-recorder!. A value that is not callable is refused when it is registered rather than failing at every call site later.barebuild.validation exposes validate-contract, validate-payload and conform-payload. validate-value-type and err are no longer public.validation/conform-payload, the write-side entry point. It reads a record as its shape declares it before validating, so a number typed into a form is not reported as the wrong type.:write to the view, the write the resource last submitted and how it ended, with consumer-resource/own-write? to ask whether it was this consumer's. A write moves :writing? for every consumer the resource drives, so a form acting on that movement asks this first.consumer-resource/view, the view a consumer was last applied, for a gesture handler that fires from the DOM and is handed none.:refresh and consumer-resource/submit-refresh!, a read of the current intent that leaves the intent and the URL untouched, for a gesture that asks the same question again rather than a different one.:request-decorator in init sets the hook to whatever the key holds, nil included, and leaving the key out leaves the installed one alone, so a second init does not silently drop it.disconnectedCallback in the middle of the connect's own effects, and the abort that step emits now reaches the request rather than running before it was issued.:member-write-without-id rather than as an op the vocabulary lacks.shape or query that is not an object, and a fields or options that is not a list, no longer end the request as a transport failure.shape.fields is mandatory. A shape carrying no field list is a contract failure rather than a response whose records go unchecked.type is checked for presence only, as an absent required or enum constrains nothing.normalize-headers moves from the server-resource model to barebuild.utils.request, and the request pipeline moves to a new barebuild.transport.barebuild.utils is split into barebuild.utils.url, barebuild.utils.query and barebuild.utils.request.:on-apply hook added in 0.5.0 is removed. A consumer is handed a projected view carrying :accepted, :failure, :intent, :pending? and :writing?, which is the state :on-apply existed to reach.:request/id, and resource/render-key is removed with it. :render-key defaults to the accepted envelope itself.<server-resource> reports what used to pass in silence: an intent naming a resource that is not on the page, an event or effect outside its vocabulary, and custom elements inside it that are never defined.credentials, headers and timeout attributes and a request decorator for credentials that change independently of the resource value.shape.fields[].options names each value a field may take, alongside enum which constrains it.:on-apply hook to consumer-resource/register!, called on every projection, so a consumer can re-derive state that does not depend on :last-accepted being present (an empty gate driven by the URL, for example).<server-resource> elements coordinate on one page. A named resource namespaces its URL keys under its resource-id (tasks.sort, projects.name), and an unnamed one owns the bare root keys. A consumer sends a targeted submit-intent! to a named sibling, so coordination runs through the URL with no shared store.x-drag-panel and x-drop-zone components.First release. The <server-resource> runtime with a pure step lifecycle, the consumer-resource/register! mechanism, create and delete writes, and a Babashka-backed demo. Published to Clojars.
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 |