This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-05-29
Channels
- # aleph (4)
- # architecture (12)
- # bangalore-clj (1)
- # beginners (87)
- # boot (3)
- # cider (19)
- # cljs-dev (84)
- # clojars (10)
- # clojure (79)
- # clojure-italy (7)
- # clojure-nl (19)
- # clojure-russia (10)
- # clojure-spec (9)
- # clojure-uk (55)
- # clojurescript (64)
- # core-async (7)
- # core-typed (4)
- # cursive (7)
- # data-science (2)
- # datomic (8)
- # devcards (6)
- # docs (1)
- # duct (5)
- # fulcro (117)
- # graphql (1)
- # instaparse (1)
- # leiningen (13)
- # lumo (103)
- # nyc (3)
- # off-topic (54)
- # om (9)
- # onyx (1)
- # pedestal (6)
- # planck (3)
- # portkey (7)
- # re-frame (26)
- # reagent (20)
- # ring-swagger (14)
- # shadow-cljs (164)
- # sql (11)
- # tools-deps (25)
- # yada (1)
Issue #1: don't use aget
(this is a side issue)
https://clojurescript.org/news/2017-07-14-checked-array-access
Issues #2: (also a side issue)
if possible it is better to use React's ref
feature, rather than (.getElementById js/document "XXX")
. See Reagent's /docs
for how.
Issues #3:
Try using :component-did-mount
instead of :component-will-mount
... just to remove race conditions
But this a wild guess (you don't want to be rendering before the canvas element is in the DOM, particularly on figwheel reloads)
Also, this may help (maybe): https://github.com/dankreek/lik-m-aid
Tips on making a PWA with re-frame? That is, using local storage and workers to offer a seamless app that's resilient to network problems after the initial load? I'm currently pondering whether to use re-frame-storage or the re-frame-storage-fx for persistence
Both of these use the old local storage (or session storage) which can only store strings. And they don't do any serialization to bypass it, so it's a no go. I could write my own serialization, but I think I'll just try to figure out a good way to use service workers and the cache api instead, and let re-frame still think it's using plain network.
@e.tmailbank shouldn’t this
:component-will-mount
(pixi-art/load-resources!)
be
:component-will-mount
#(pixi-art/load-resources!)
?@thheller currently undocumented, but its in place: https://github.com/sveri/closp
https://github.com/sveri/closp/blob/master/resources/leiningen/new/closp/cljs/routes.cljs https://github.com/sveri/closp/blob/master/resources/leiningen/new/closp/cljs/views.cljs
If you mean client-side routing, even the plain re-frame Leiningen template has that (with the +routes
option).
@tomi.hukkalainen_slac Oh, I am interested in it. More Especially, I want to create a chatbot with visual character. So, I'm learning pixijs.
Upgraded to these dependencies:
[reagent "0.8.1"]
[re-frame "0.10.5"]
[day8.re-frame/re-frame-10x "0.3.3-react16"]
Getting a warning and an errorin the console:The first render is fine. This happens when I refresh the page
I used the popout feature and it doesn’t seem to happen when it’s embedded in the page. Also when I refresh the page when it’s popped out it seems to disconnect….shows “Host window has closed. Reopen external window to continue tracing.”
I’ve tried factory reset and clearing local storage
I can just use the ctrl +h sidebar but if I don’t have it open on page refreshes it doesn’t seem to capture any events
Is there some idiomatic way to clear a cached sub?
I’m hoping to just clear a single cached sub, not all @kenny. It’s probably not a super common use case, so I’ve no problem just dissocing from the cache. Was just wondering if there was a nicer way
@colindresj https://github.com/Day8/re-frame/blob/master/src/re_frame/subs.cljc#L32
Lookup the reaction and call dispose!
on it.
:thumbsup:
Both of these use the old local storage (or session storage) which can only store strings. And they don't do any serialization to bypass it, so it's a no go. I could write my own serialization, but I think I'll just try to figure out a good way to use service workers and the cache api instead, and let re-frame still think it's using plain network.