This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-05-25
Channels
- # aws (10)
- # babashka (4)
- # beginners (103)
- # calva (19)
- # chlorine-clover (2)
- # cider (10)
- # cljs-dev (23)
- # cljsrn (6)
- # clojure (145)
- # clojure-europe (17)
- # clojure-nl (1)
- # clojure-spec (11)
- # clojure-uk (4)
- # clojurescript (64)
- # conjure (11)
- # core-async (19)
- # cursive (38)
- # datomic (4)
- # duct (2)
- # fulcro (51)
- # helix (11)
- # joker (1)
- # kaocha (7)
- # leiningen (3)
- # malli (5)
- # meander (3)
- # off-topic (12)
- # pathom (17)
- # pedestal (2)
- # re-frame (27)
- # rum (11)
- # shadow-cljs (77)
- # xtdb (9)
- # yada (1)
hey, is someone here using intellij/cursive for re-frame and knows if it’s possible to make command+click go to definition of an event?
i.e. have cursive understand something like [::a.e/log-event …]
and jump to where :log-event
was defined
Yes, Cursive has been aware of re-frame for some time now. But you have to use reg-event-*
functions that are provided by re-frame - you cannot use any wrappers around them.
so for example i have this at analytics.events
:
(re/reg-event-fx
::log-event
fn [] ...)
and at some other file:
(ns ...
(:require [analytics.events :as a.e]))
(re/reg-event-fx
:some-other-event
(fn [...]
{:dispatch [::a.e/log-event :something]}))
when i cmd+click on ::a.e/log-event
it does nothing
ooohhh…. good catch, no it’s a wrapper :face_palm:
yeah, you’re right, changing it to
(re-frame.core/reg-event-fx ...)
seems to workYeah, I suffer in the same way. :) Colin has promised that there's something planned in this regard, IIRC.
great, 🤞
works for reg-fx
as well (when i use re-frame.core directly, without a wrapper)
Howdy all, I'm trying to fetch some data from an api and I keep getting a CORS error. Hoping someone here can help me 🙂
This is the error:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at
It's not re-frame-related at all. The error is pretty self-explanatory, you just need to know some "what"s and "why"s about CORS: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
Ah I see, the API isn't sending the response with an 'Access-Control-Allow-Origin' header
Do you know of an easy way to bypass this just for dev that doesn't require me going back and modifying the API?
There's a client, there's a server, and there's a connection between them. 3 components, so 3 ways to fix the issue: 1. Change the client, i.e. the web browser you're using. Obviously should be avoided 2. Change the server. A preferred solution assuming that the same code will be used in production 3. Change the connection. I.e. plug into it a proxy that sets that header for you. A bit of a hassle to set up but may be fine for development
Hi. I run my clojure-script code with shadow-cljs when ever there is a bug in the code (especially functions for view) the page completely goes out (I get a white blank page) and some error pops up on the console Is there any method to avoid losing the whole page despite of the exceptions thrown on different parts of the code? In other words what are the best practices for this kind exception handling for these situation? Thanks.