Fork me on GitHub
#re-frame
<
2017-08-07
>
jfntn00:08:17

If that’s something you’d be interested in I can start on a proposal to try and address your earlier points and open an issue when it’s ready

mikethompson01:08:15

I'm interested to know what worries you about the approach outlined in the FAQ?

mikethompson01:08:56

I want to be sure I understand what works and what doesn't

gadfly36107:08:07

@mikethompson @jfntn My two cents: For most people, call-global-interceptors would never be used and would just add complexity to grok reg-event-db and reg-event-fx. So I like the FAQ approach to make your own versions - seems straightforward enough.

andrea.crotti10:08:30

so just to be sure, but using re-frame & co, what clojuscript is going to modify is only what's in <div id="app"></div> right?

andrea.crotti10:08:59

if I have some other custom JS and other HTML in the page they should not get affected right?

andrea.crotti10:08:54

I have problems for example simply integrating google maps now (but it might be something else the problem I guess it should still work)

nilrecurring10:08:11

Or the google maps is outside the re-frame application?

andrea.crotti10:08:38

ah nice I should probably do that instead

andrea.crotti10:08:48

yes I was just trying to use it outside re-frame

andrea.crotti10:08:55

just to get it working first

andrea.crotti10:08:06

and wondering if it should still work since it should be unrelated

andrea.crotti11:08:55

actually my case is even simpler than that I believe

andrea.crotti11:08:14

since I just want to show the map with a marker on

andrea.crotti12:08:11

and actually I think I'll just be lazy and use https://hpneo.github.io/gmaps/examples.html

andrea.crotti12:08:25

the actual div id="map" is still injected by clojurescript anyway

andrea.crotti12:08:32

and I control the CSS for that as well

andrea.crotti12:08:51

so since I don't need data back from the map it's much simpler this way I think

andrea.crotti19:08:35

is it a big sin if I combine some server side rendering with re-frame?

andrea.crotti19:08:07

just for a few things I want to inject in the very few pure JS bits

kenny21:08:17

Does anyone know if there is a way to get components with local state to maintain that local state after a hot reload? For example, this component:

(defn LocalStateComponent
  []
  (let [count (reagent.ratom/atom 0)]
    (fn []
      [:div
       @count
       [:button {:on-click #(swap! count inc)} "inc"]])))
will reset to 0 after hot reloading. Is there a solution to this?

andrea.crotti21:08:19

how do people do localization (just two languages really) with re-frame?

andrea.crotti21:08:56

the only annoying thing however is that I have to carry the current language all over the place (I'm storing it in the db atom)

andrea.crotti21:08:18

and somehow pre-pend every single string to make sure it's localised

andrea.crotti21:08:26

I guess there must be better ways to do that?

andrea.crotti21:08:25

the only other alternative I see would be have a function that transforms nested data structures representing my components

andrea.crotti21:08:48

that goes deep into them and translates everything that way, which however seems a bit hard to do as well