Replace update-nexus option with registry option #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It has been really enjoyable adding domain specific effects to datastar.wow apps. The
update-nexusfunction serves the purpose well, but thenexuslanguage (while accurate) feels like an odd detail. I am also noticing some patterns emerge in how I pass dependencies to effects and interceptors. I also have some dev tooling that would benefit from being able to dispatch from the REPL so this PR adds that ability as well.Breaking Changes
Removed
:datastar.wow/update-nexusand replaced it with:datastar.wow/registries.:datastar.wow/update-nexuswill now be ignored. Addsdispatchfunction for creating a dispatch function for "out of band" dispatches.
Changed
Effect + Nexus extension is now powered by registries. A registry IS a Nexus map, but with
:datastar.wownamespaced keys. Keys are aliasednot to aura farm, but to reduce cognitive load (single require is a good thing).
The vector syntax is particularly useful for scenarios using a component system like integrant.
Added
Adds a
dispatchfunction that takes a subset ofwith-datstaroptions:::d*/registries,::d*/write-json, and::d*/write-html. Thisdispatch can be passed to
with-datastar.If a dispatch function is given,
::d*/registries,::d*/write-json, and::d*/write-htmloptions given towith-datastarwill be ignored.