re-frame port using React hooks instead of Reagent.
Designed to be used with Helix or UIx.
This library is in alpha state. While most of the code was copied directly from re-frame, and should be pretty stable, refx's additions need more testing, and the API might still change drastically.
Releases are available from Clojars.
deps.edn:
com.fbeyer/refx {:mvn/version "0.0.49"}
Leiningen/Boot:
[com.fbeyer/refx "0.0.49"]
You can use also use the Git coordinate:
{:deps {refx.core {:git/url "https://github.com/ferdinand-beyer/refx.git"
:git/sha "COMMIT_SHA"
:deps/root "core"}}}
See this blog post for an explanation why I started working on refx.
subscribe
has been replaced with two functions:
sub
returns a subscription signal, to be used in input functions
in reg-sub
use-sub
is a React hook that return's a subscription's value.
These are not atoms and don't need to be dereferenced.sub
and use-sub
do not support the rarely used
extra dyn-v
argument. See the next point for a superior alternative.sub
for dynamic
subscriptionsapp-db
as input. Anything
that satisfies the ISignal
protocol, which includes atoms.See the examples
directory for re-frame's todomvc,
implemented with Helix and UIx.
Distributed under the MIT License.
Copyright © 2022 Ferdinand Beyer
This software uses third-party open-source software.
See NOTICE for individual copyright and license notices.
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close