Hey Rob,

That's a great question.  As you can imagine, I like cycle.js a lot, and am 
not a huge fan of React.

The problem with React, imo, isn't (just) that they're addicted to making 
their APIs look like OOP when they're not.  The problem is that they built 
a system on the same [event callback]->[state update] system that's 
inherent to mutational programming.

A Recurrent (or cycle.js) app can be written (conceptually) without state 
altogether.  Components are just functions that take some data, and produce 
other data.  The catch being that the data can change over time, but that's 
actually meaningless from a programming perspective.  You write the code as 
though you were writing pure functions over static data, and (magically 
kinda) it's all wired up and moving at the end.

I think this is a much better model overall, than React.  Components are no 
longer dependent on a giant state ball that can be updated from anywhere 
and cause code to fire off all through the system.  The burden of writing a 
bunch of extraneous constants, actions, reducers, and event handlers is 
lifted.  Functions can't be "connected" to anything.  They get passed some 
data, and return other data, that's all.  

So, I think the cycle.js/fully-reactive model is really brilliant.  That 
may just be the way my brain works, I dunno.  Cycle.js hasn't particularly 
set the world on fire and Recurrent definitely still has some rough edges. 
 But having written a couple of moderately sized apps in Recurrent now, I 
definitely don't want to go back.

Jeremy

On Thursday, April 5, 2018 at 2:18:27 PM UTC-4, rob wrote:
>
> Oh, I misunderstood what jeremykross/recurrent was at first. I thought it 
> was a cyclejs wrapper, like the various clojurescript wrappers for 
> reactjs.  It turns out it's a ClojureScript implementation of the approach 
> that cyclejs implements.
>
> On Wed, Apr 4, 2018 at 8:18 AM, Robert Levy <r.p....@gmail.com 
> <javascript:>> wrote:
>
>> Hi Jeremy,
>>
>> These look great!  This might be the wrong forum for it (or maybe it's 
>> the best forum for it), but I'd be curious to get your take on why one 
>> might choose Cycle over React with something like Reagent+Re-frame to do 
>> event-driven dataflow programming in the browser.  Surely Cycle is a much 
>> smaller community with a less active supporting library ecosystem.  It's 
>> true that React has more unnecessary complexity and OO-ish cruft, even with 
>> nice tools like re-frame to make things better.
>>
>> Rob
>>
>> On Fri, Mar 30, 2018 at 8:47 PM, Jeremy Kross <jeremy...@gmail.com 
>> <javascript:>> wrote:
>>
>>> Hey everybody,
>>>
>>> I've been hacking on these for about two years, but I only recently got 
>>> around to documenting them to a place where they're semi-presentable.
>>>
>>> First up in Ulmus, a library for doing frp style programming in 
>>> Clojurescript.  I apes the Elm API to some degree.  Really just 
>>> higher-level core.async, but I've found it pretty great to work with. 
>>>
>>> https://github.com/jeremykross/ulmus
>>>
>>> Second is Recurrent, a library for building functionally reactive web 
>>> components.  It's inspired most directly by cycle.js but I think there's 
>>> good bit of novelty there as well.  Can't say that it's for everybody, but 
>>> the way my mind works, it's been real joy to develop and use.
>>>
>>> https://github.com/jeremykross/recurrent
>>>
>>> Hope somebody else will find these cool as well.
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> To post to this group, send email to clo...@googlegroups.com 
>>> <javascript:>
>>> Note that posts from new members are moderated - please be patient with 
>>> your first post.
>>> To unsubscribe from this group, send email to
>>> clojure+u...@googlegroups.com <javascript:>
>>> For more options, visit this group at
>>> http://groups.google.com/group/clojure?hl=en
>>> --- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Clojure" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to clojure+u...@googlegroups.com <javascript:>.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to