This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-12-28
Channels
- # adventofcode (6)
- # beginners (61)
- # boot (1)
- # chestnut (1)
- # cider (18)
- # cljs-dev (1)
- # cljsrn (3)
- # clojure (176)
- # clojure-android (8)
- # clojure-germany (12)
- # clojure-russia (4)
- # clojure-spec (7)
- # clojure-uk (5)
- # clojurescript (28)
- # css (10)
- # cursive (36)
- # datomic (7)
- # devcards (1)
- # docs (8)
- # emacs (17)
- # fulcro (29)
- # hoplon (28)
- # lein-figwheel (3)
- # leiningen (37)
- # lumo (1)
- # off-topic (54)
- # om (6)
- # re-frame (2)
- # reitit (7)
- # ring-swagger (23)
- # shadow-cljs (115)
- # sql (10)
- # uncomplicate (1)
- # unrepl (24)
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
if it’s actually a win for you to send deltas, i’ve used https://github.com/Skinney/differ for that purpose.
@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
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?
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)
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.
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".
how are you doing the store / restore? I use transit to encode and decode and have had no issues
oh, sorry, misread
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).
{} isn’t a js object, and I think this is the problem
@thheller the reason I crossed out my attempt was that it isn’t a string serialization issue - the api wants an object
you could use a string though - maybe as a property in the thing
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.
that’s browser specific, of course
anyway yeah a cljs hash map is definitely too big the wrong thing for that
hmm interesting. I'll try to combine a string that I can use to look up the correct values. Thank you.
@thheller @noisesmith Storing a string as a js-obj property worked well. Thanks again.