reagent

A minimalistic ClojureScript interface to React.js http://reagent-project.github.io/
coby 2020-03-05T00:19:11.094Z

Well, anyway I'm having a decent amount of luck with react-reveal. It's surprisingly easy. Framer looks cool regardless, thanks for the link!

2020-03-05T07:07:33.094400Z

May be i am missing something here but for me it is just a data provider. So you should be able to insert the library you need to get the data from the server in each resolver ?

2020-03-05T07:10:08.094600Z

Framer motion is open source ! But framer is a another tool from the same company

2020-03-05T07:10:08.094800Z

https://www.framer.com/motion/

2020-03-05T07:10:34.095100Z

i think you should go directly with framer motion as it is a breeze to use and so powerful

2020-03-05T08:04:32.095800Z

@slawek098 We use re-frame with Hasura/Postgress and it is working out well. Hasura's subscriptions seem to be endlessly useful. We use Hasura's webhooks to callout to perform serverside logic (this logic can be in whatever language you want, including Clojure or Python or whatever) In fact, you can use an approach where saving a record in the database, triggers serverside code, which acts as someone of an effect handler.

2020-03-05T08:11:37.098100Z

Hmm. I'm not sure I describing this well enough. Anyway, key takeaway is that Hasura might be a terrific addition to your architecture, if you use Postgres.

1💯
2020-03-05T08:12:03.098400Z

https://hasura.io/

xhh 2020-03-05T11:50:34.099200Z

@mikethompson are you using https://github.com/oliyh/re-graph to connect to Hasura?

lilactown 2020-03-05T15:43:03.099600Z

for large applications I want something like Apollo GraphQL or Relay, to handle sharing and subscribing to queries across components

lilactown 2020-03-05T15:43:46.099800Z

so the server uses pathom, and the client uses something else to interface with pathom and intelligently cache

1👍
Felipe Marques 2020-03-05T17:53:21.101600Z

hi, I'm trying to understand if it is ok to have reagent-components with multi-arity, but didn't found any info on that 😞

aisamu 2020-03-05T18:48:52.101700Z

It is, AFAICT

1➕
coby 2020-03-05T20:03:03.102Z

huh. I wonder how I failed to find this. Error exists between keyboard and chair, apparently. 😛 Thanks a ton!!

coby 2020-03-05T20:04:50.102200Z

I will definitely give Motion a shot, it's definitely more expressive than what I'm hacking on currently.

2020-03-05T20:14:20.103500Z

I have a case where one of my components is not updating. Using a basic re-frame subscription. The value in it is clearly changing and the reaction is firing.

2020-03-05T20:14:31.103900Z

But one of the dependency component trees just is ignored.

2020-03-05T20:14:59.104800Z

One of the first I’ve seen of this doing nothing special. Standard render fn form-1. No closure situation etc.

2020-03-05T20:15:47.106300Z

Sort of hard to troubleshoot. Thinking I’ll try to look some at the queue stuff in reagent and dig around. I can’t reproduce it in a small example unfortunately. I probably could if I knew the cause, but that’s the problem! Hah.

2020-03-05T20:16:38.107200Z

It initially renders and uses the value too. It’s just a value change doesn’t trigger. If I do something else to affect the component tree it then does update.

2020-03-05T20:17:11.108100Z

Wonder if there are outstanding issues that could possibly relate.

2020-03-05T20:17:23.108700Z

I’ll dig. Was searching for like “re-render” as the term.

lilactown 2020-03-05T20:17:26.108800Z

I’ve seen similar behavior when a reagent component is called as a function, rather than in hiccup

lilactown 2020-03-05T20:17:42.109Z

not sure if that helps your investigation

2020-03-05T20:18:25.109400Z

I’m using hiccup for sure. I did look closely for that

2020-03-05T20:18:47.110200Z

And I know I gave no solid details. Hah. I appreciate that input. It certainly has been a problem I’ve seen people have before.

2020-03-05T20:40:39.111800Z

This is the most common bug symptom I see with React-based components. I usually fix it by manually putting a key on the component and making sure the key changes whenever the value changes, like this

^{:key (str "my-widget-" value)}
[my-component {:value value}]

2020-03-06T18:00:46.122Z

@manutter51 thanks for the tip - I overlooked it yesterday - I’ll experiment with this

1👍
2020-03-05T20:41:39.112700Z

The tricky part is sometimes it’s the element itself that responds to the key, and sometimes it’s a parent component. But once you get it right it stays fixed.

2👍
2020-03-05T22:56:28.113100Z

@xhh Yes, we use re-graph. i can't say I love it. It feels like the weakest part of the stack. So, I keep threatening to replace it with something better, but then a distraction happens. That's been happening for a year.