Fork me on GitHub
#re-frame
<
2017-02-27
>
gklijs06:02:41

I have a re-frame hobby project, and want to display some data on a canvas, any recommendations for which library to use, or other tips?

gklijs06:02:53

Both Quamolit and Monet seems to do the trick, but Monet seems mor appropriate for only displaying.

curlyfry07:02:03

@andrea.crotti If you're talking about changing some visual element depending on the validation, I think a class is definitely the most straightforward way. @gklijs Another advanced option is https://github.com/quil/quil. However, I think it sounds like a simpler library like monet (or just using the native browser api:s) will be appropriate for your use case.

gklijs07:02:11

Thanks that one also looks promising. It’s basically for displaying a game-state, and currently there are no interactive parts, as you can control it only with the keyboard. As the ‘field’ is 40 by 50 items, I now have to render 2000 elements each 150 ms, which causes problems on slow devices. So the main use-case it to make it more performant.

PB15:02:48

Hey all. I’m new to the cljs and the re-frame world. I’m writing an app that basically aggregates data from a few external services and was wondering teh correct way to do things. So, my current idea is when needing data from an external service would be to call the backend service, the backend service would query the external service. The back-end service would store that data and return a response to the frontend. The front end would then merge that data into the db atom and display that data. Does that sound reasonable?

negaduck16:02:46

@petr, quite reasonable. But is it possible to get rid of backend? Can your client-side query services and filter data by itself?

PB16:02:22

@negaduck My worry would be a good way of storing api tokens and general

PB16:02:48

Would a better implementation be to use the backend to store sensitive credentials and have them exposed via a /config endpoint or something? Then to query from the frontend, and post the updated records back to the api?

negaduck16:02:25

if tokens are service-wide, not per user, I wouldn’t give them away to any client

PB16:02:28

In some cases they are, in others not

fabrao21:02:50

Hello all, I´m try to figure out how to clean a input field and focus it after a click button. I tried to use .focus inside reg-event-db, but the screen clean up. Any idea?

andrea.crotti22:02:21

mm silly question maybe but in HTML can't I in theory assign multiple classes to the same object?

andrea.crotti22:02:48

doing [:button {:class "one" :class "two"}] however fails for obvious reasons

danielcompton22:02:12

FYI: re-frame now has a code of conduct for contributing: https://github.com/Day8/re-frame/blob/master/docs/Code-Of-Conduct.md. This wasn't added in response to any incidents, and the re-frame community has always been kind and respectful. This was mainly prompted by putting re-frame in for Rails Girls Summer of Code: https://teams.railsgirlssummerofcode.org/projects/125-re-frame, though it's not a bad idea to codify expected behaviours.

andrea.crotti22:02:42

I tried to set the id instead with :id but it's not the right thing apparently

andrea.crotti22:02:49

ah no wait :id works fine my bad

fabrao22:02:48

@pesterhazy many thanks, it worked, I used focus inside on-click not in reg-event-db

pesterhazy22:02:01

separate classes by space, @andrea.crotti

pesterhazy22:02:00

@fabrao glad you figured it out!