Fork me on GitHub
#re-frame
<
2017-08-14
>
mikethompson01:08:24

@scknkkrer you asked a vague, poor quality question, got no answer and then lashed out with some snark. That comes off as "entitled". Note: people are getting their questions answered (by volunteers) in here ALL THE TIME. But yours wasn't. Think about that. What does it tell you? Perhaps you should be asking yourself what it was about your question that caused it to not be answered? I feel like you might benefit from reading this "classic", regarded by many as the the gold standard in advice on the subject of asking technical questions: http://www.catb.org/esr/faqs/smart-questions.html

reefersleep09:08:08

Just want to take the opportunity to thank those volunteers (yourself in particular, you’re very active here!) for answering all of the questions I’ve answered so far 🍻

reefersleep09:08:23

Thank you to all the volunteers! 🍻

akiroz10:08:34

That's a nice detailed guide, saved for future reference 👍

mikethompson01:08:24

------------- @profgra I try to never have data in a component local state. I always try to put all state in app-db, perhaps via :on-blur (rather than :on-change) where possible.

mikethompson01:08:42

The moment we have state in two places, you have to synchronize it. Now, we can certainly find ways to do that. But (as you suggest) my advice is to avoid needing to do it whereever possible.

mikethompson01:08:07

@sandbags yeah, re-com uses Bootstrap for largely historical reasons. But hard now to evolve that forward. The criticisms about its lack of "ambient classes" is very valid (in effect, every div should have a class on it which you, the users of the library, can provide a style for, perhaps via Garden?)

mattly16:08:59

FWIW I'm using a version of http://tachyons.io that I've recreated in Sass on my project, have been for a year. My CSS is 10k and I rarely touch it.

mattly16:08:54

This is different from inline styles in some important but subtle ways that are difficult to understand without actually working in this style of CSS

mattly16:08:55

but that's besides the point; I feel like the main problem people are trying to solve with overrideable/customizeable css is to somehow separate structure from appearance

mattly16:08:30

that is, position/float/flexbox vs color and font-size, and the gray area of things like border-widths and the box model in between

mattly16:08:08

That said, I'm working on a library targeting Garden 2.0 to make making customizeable tachyons-style rule sets easy

mikethompson01:08:07

We were very influenced by the idea of using in-line syles when we wrote it. That seemed like a very good idea at the time. We're slightly older and wiser now. We still want our CSS to be colocated with the components (and not off in a remote CSS file, if possible), but these days, if we were doing it again, we'd probably do it with Garden.

mikethompson01:08:09

Anyways ... we're working with what we have

sandbags08:08:19

@mikethompson no good decision goes unpunished 🙂

akiroz10:08:26

I guess so, but I've really only seen these "constants" / "enums" used in redux code bases.

scknkkrer14:08:46

Ok, my fault. How do you guys navigation on react native application with re-natal: re-frame + reagent ?

scknkkrer14:08:14

I haven’t seen any documentation. Maybe I am blind. Maybe idiot. Forgive me.

danielneal14:08:39

Hey @scknkkrer it's tricky as there's not that many examples about. http://reactnavigation.org seems to be one of the most promising options, although there's a library from wix too. I've been using http://reactnavigation.org library with reframe thanks to @seantempesta 's library https://github.com/seantempesta/cljs-react-navigation. He's helpfully put together specs for all of the router / screens etc which helps understanding what you have to provide all of the components with.

danielneal14:08:13

There's not much documentation about because there's not many people doing it I think!

scknkkrer14:08:47

I am a quick-learner, but I am not quite understand how navigation works properly.

scknkkrer14:08:20

I get some points, navigation tools are components too. And we use it for nesting.

danielneal14:08:44

yeah I don't really 100% understand what's going on either, it's quite hard to follow, with all this getStateForAction stuff.

scknkkrer14:08:47

I am so idiot. I can’t picture it my mind completely. Sorry for this.

danielneal14:08:59

The reframe approach is close to the redux approach. Trouble is that's an "advanced" topic in the reactnavigation docs. https://reactnavigation.org/docs/guides/redux

danielneal14:08:04

you'll store the routing in the db, and then dispatch navigation actions

danielneal14:08:26

If I were you I'd clone sean's library above and have a play with it there's a reframe example in the repo

danielneal14:08:03

that's what finally got me going

scknkkrer14:08:10

OMG. This example is really understandable.

scknkkrer14:08:30

Sorry for my silly question. Thank you @danieleneal.