Fork me on GitHub
#clojurescript
<
2017-12-28
>
wiseman00:12:47

it sounds like @sova does want something fancier than straight memoization/caching--since you mention wanting to send a delta, it sounds like search results could change

wiseman00:12:32

if it’s actually a win for you to send deltas, i’ve used https://github.com/Skinney/differ for that purpose.

achikin08:12:08

Hi, I have issues with Hiccup.

achikin08:12:17

I have a div like this

achikin08:12:40

[:div {:style {:animation "debug 2s"}}]

achikin08:12:02

But animation disappears in a browser.

achikin08:12:47

Hmm, it works if I provide animation-name and animation-duration separately.

mikerod16:12:50

@achikin was it due to React prior to v16 removing unrecognized attributes? https://reactjs.org/blog/2017/09/08/dom-attributes-in-react-16.html

mikerod16:12:17

this is a :style attribute, so not sure

kennytilton20:12:31

Does anyone know of a project template that would include developing both a CLJS client and a CLJ server? Or is that a daft idea?

noisesmith20:12:02

there’s a few, luminus is popular and it creates cljs if you pass it the right flag when using the template (adding figwheel is also recommended I forget if that’s another argument)

deg20:12:05

Take a look at https://docs.google.com/spreadsheets/d/1Y97YP_coSYuUVt1Gk2m4gokir2s9_K3w-lvwd4qB6Js/edit#gid=864782811, where I tried to categorize most of the popular templates and frameworks.

michael92321:12:13

Hi, does anyone know if there are tricks to storing/accessing clojurescript maps in (.-state js/history)? I'm having trouble accessing a map I put in there. It tests as a map via (map? x), but when accessed shows a "Uncaught TypeError: obj.cljs$core$IPrintWithWriter$prwriter$arity$3 is not a function".

noisesmith21:12:51

how are you doing the store / restore? I use transit to encode and decode and have had no issues

noisesmith21:12:13

oh, sorry, misread

michael92321:12:13

I use (.pushState js/history {:title "Example" :body "<p>This is a test</p>"} "Document Title" "/path/file.html") to store and pull it from the pop event (.-state event).

thheller21:12:54

you'll need to pr-str and read-string it

noisesmith21:12:54

{} isn’t a js object, and I think this is the problem

noisesmith21:12:17

@thheller the reason I crossed out my attempt was that it isn’t a string serialization issue - the api wants an object

thheller21:12:19

some browsers don't even support normal JS objects

noisesmith21:12:39

you could use a string though - maybe as a property in the thing

thheller21:12:42

at least didn't use too

noisesmith22:12:01

The state object can be anything that can be serialized. Because Firefox saves state objects to the user's disk so they can be restored after the user restarts the browser, we impose a size limit of 640k characters on the serialized representation of a state object.

noisesmith22:12:11

that’s browser specific, of course

noisesmith22:12:27

anyway yeah a cljs hash map is definitely too big the wrong thing for that

michael92322:12:17

hmm interesting. I'll try to combine a string that I can use to look up the correct values. Thank you.

michael92322:12:18

@thheller @noisesmith Storing a string as a js-obj property worked well. Thanks again.

phlie23:12:11

Is there a way, in EMACS, to change a cider-connect which creates a CLJ REPL to a CLJS REPL once the original REPL has changed from CLJ to CLJS with (start-repl)?