Fork me on GitHub
#re-frame
<
2020-01-20
>
beders15:01:17

good morning, how do you prefer to manage your re-frame DB atom? I'm currently looking at re-posh which basically provides a similar API to talk to a DataScript database. Then I found Keechma's very simple but useful EntityDB to enforce some structure on a client-side DB. There are so many options. I assume, most people roll their own mutation/querying ?

danielneal15:01:31

We rolled our own minimal kind of thing with maps, https://github.com/riverford/compound

👍 4
danielneal15:01:48

we needed multiple indexes for our kind of data model

victorb15:01:48

we don't have a very large or complex DB atom, so ended up just using https://gitlab.com/nikperic/reframe-utils + clojure.spec for now. Been working well for about ~7 months we've been using it. touches wood

👍 4
beders16:01:24

thank you very much for your replies!

abdullahibra19:01:51

is there anybody using materialize ui with re-frame ?

p-himik19:01:35

I know about Material UI and just found Materialize. Which one you meant?

p-himik19:01:34

If you meant something else, can you give a link?

p-himik19:01:14

Yes, I've used it. Why?

abdullahibra19:01:28

actually i'm using a bulma but i want more advanced one which has components

abdullahibra19:01:51

is there a lib which you are using for it, or just the npm package?

p-himik19:01:29

Just the NPM package. All the libs that I've seen don't require the NPM package in the right way. And they don't give any noticeable advantage over using the NPM package itself.

abdullahibra19:01:58

can you give example of how do you use that?

abdullahibra19:01:08

even for one component

p-himik19:01:38

Just as any other React component in Reagent.

[:> Button {...some flags...}
  ... some children ...]

abdullahibra19:01:47

that's perfect

p-himik19:01:53

Although usually I do something like (def button (reagent/adapt-react-class Button)) and then just use it as [button {...} ...].

abdullahibra20:01:33

what's your impression on it ?

abdullahibra20:01:42

is there something you see better or worthwhile ?

abdullahibra20:01:49

have you checked bulma before ?

p-himik20:01:02

It's fine. I haven't worked with many other UI libraries, except for Bootstrap and re-com, so I can't really say anything here. I imagine there are trade-offs that you have to study before making a choice.

abdullahibra20:01:26

also do you have something live using matrial UI ?

p-himik20:01:28

Bulma doesn't have support for numeric inputs - you have to implement them yourself, maybe on top of their text inputs. That's why I didn't even try it. Nothing I can show right now, no.

abdullahibra20:01:52

okay that's a great help, thank you

p-himik20:01:34

Although if I did have something, it wouldn't be that different from any other website that uses Material UI. So you can just check anything from https://material-ui.com/discover-more/showcase/

p-himik20:01:37

No problem.

beders21:01:50

has someone tried to use spec for the output of subscriptions? I often find it difficult to check what a subscription returns. Annotating it with some spec would be helpful (also for generating test). Any ideas?

shaun-mahood21:01:00

This may not be the solution you're looking for, but https://github.com/day8/re-frame/blob/master/docs/Testing.md#subscription-handlers is probably the place I would start - spec the function rather than the handler.

beders22:01:36

good point, thanks