[0.5.2] - May 16, 2019
- Alpha hooks
useSmartMemothat auto-detect dependencies based on the body.
useIRefnow properly memoize their dispatch functions to prevent unnecessary renders.
useReducercan now be passed IFn's like multimethods
[0.5.1] - May 05, 2019
- Function-as-children were not passing props correctly
<-valuehook mutated ref in render, making it not safe for use in Concurrent React
- Converting prop
classwas only done when hiccup parsing; now also happens in
defncso it works with
- Improved hiccup interpretation by 10x
- Deprecated Hooks names prepended with
- Changed API for extending components; now you can call
(extend-tag :new-tag ReactComponentToUse)
- A new
hx.hooks.alphanamespace with experimental Hooks
- Alpha-level "reloadable" hook
useStateOncethat persist their state across hot reloads.
[0.4.0] - Mar 26, 2019
<-statenow returns a
[value set-value]tuple instead of an atom.
- props passed into hiccup are only converted camel->kebab and back if the element is a keyword.
hx.hiccupis now cross-platform (CLJ + CLJS) and has been decoupled from React
<-valuehook that caches the Clojure value passed into it, and only returns a (referentially) different value if it is
not=the previous one. Useful for optimizing renders with things that might return the same data structurally, but with a different reference.
<-state's update function can take arguments like
(set-value assoc :foo "bar")
<-statecan take a third argument: a function that returns
trueif the new value and previous value are equal. If true, it will not apply the change.
- Lots of tests
defcomponentcomponents now have prettier display names (for e.g. React devtools)
defncnow can be passed a
:wrapoption with a collection of higher-order components to wrap the component in
:classprop having value
- Special chars (e.g.
?) in props being dropped
<-effectwhere a function is not returned by
fcaused an error
<-refwas just broken
[0.3.3] - Mar 08, 2019
- Race condition in
- Props with numbers, two-letter camel-case were dropped or truncated
[0.3.2] - Feb 25, 2019
swap!works on a
<-stateatom inside of
classNameprop is available as either
:class-namewhen parsing props in
defncto provide parity with hiccup parser's conversion of
- namespaced keywords are now preserved in props maps
[0.3.1] - Feb 20, 2019
<-ref: Pass initial value to
[0.3.0] - Feb 10, 2019
<-deref: no longer takes a
depsargument, but will automatically re-watch if atom argument changes (breaking)
<-deref: Fix bug where two calls on the same atom didn't work as expected
<-effect: Convert second argument
depsfrom CLJS collection to array
<-ref: Have deref return the
currentvalue in React ref (breaking)
- Additional core hooks: