Fork me on GitHub
#announcements
<
2019-03-26
>
lilactown21:03:25

hx version 0.4.0 has been released! This is a major change and has a number of improvements: - Local state hook <-state now returns a tuple [value set-value] instead of an atom-like value - The hiccup parser hx.hiccup has been completely decoupled from React and made cross-platform - DX improvements like prettier display names and helper syntax for using higher-order components - Numerous bug fixes - Lots of tests Check out the full changelog here: https://github.com/Lokeh/hx/blob/master/CHANGELOG.md#040---mar-26-2019 Thanks to @orestis @mhuebert @roman01la @djebbz for the help! More to come soon 😄

🎉 36
henrik06:03:29

Cool! This looks interesting. What's the value proposition for using hooks in cljs?

orestis08:03:08

The promise that when concurrent React lands, you will get it “for free”, including prioritizing and canceling renders. Whereas with the current CLJS approaches (and with most/all other JS state management frameworks, to be fair) React doesn’t have the context to be nimble about updates.

👍 4
orestis08:03:21

At the same time, hx takes an opinionated approach of using plain React components everywhere. So you could in theory hook it up with existing state management solutions.

orestis08:03:04

It’s early days, hooks look very promising but I expect things will be more stable and production ready in a few months time.

orestis08:03:15

Oh, forgot to mention - hooks allow you to do almost everything that class components provide (all the lifecycle methods) from functional components - in a way that’s actually reusable. So that’s a huge plus in my book.