This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-03-24
Channels
- # beginners (108)
- # boot (16)
- # bristol-clojurians (1)
- # cider (20)
- # cljs-dev (167)
- # clojure (64)
- # clojure-greece (4)
- # clojure-hamburg (1)
- # clojure-russia (1)
- # clojure-uk (27)
- # clojurescript (235)
- # datomic (1)
- # devops (2)
- # fulcro (80)
- # graphql (6)
- # heroku (2)
- # jobs-discuss (1)
- # jobs-rus (2)
- # lein-figwheel (1)
- # lumo (2)
- # nyc (1)
- # off-topic (22)
- # portkey (4)
- # re-frame (44)
- # reagent (39)
- # ring-swagger (9)
- # shadow-cljs (90)
- # tools-deps (5)
- # vim (8)
- # yada (2)
I used to get one of these on and off. Now I get 130 of them on startup. Am I doing something wrong here or should I ignore them? WARNING: Use of undeclared Var fulcro.util/conform! at line 202 file:/usr/home/markus/.m2/repository/fulcrologic/fulcro/2.4.2/fulcro-2.4.2.jar!/fulcro/client/alpha/dom.cljs. Or could this be related to having "old style" code that passes nil like in (dom/h1 nil "Title") because that used to be necessary?
@magra this is a bug with the specs that make the conform, I'm working on some changes to the new dom api, this one is already fixed there
@wilkerlucio Great! Thanx!
@magra sorry, I misread your message, I had some issues with conform hitting the wrong spec, but your case seems to be something else
are you using figwheel or shadow for compilation? just trying to debug if we missed some needed requires or something
@wilkerlucio I use figwheel
ok, and your app is working correctly?
sounds like the macro is somehow spitting out a conform…but I’m not remembering that in the macro expand
Today I only got them on startup. I am developing all day and everything works as far as I can tell.
@tony.kay so fulcro.client.alpha.dom
should require fulcro.util
, right?
if it was an externally usable macro I’d fix it differently, but in this case it’s just internal
This includes Wilker’s new expression support for props with alpha dom, and the require problem @magra just reported.
thanks for trying the new support and reporting problems. I’d love to get it out of alpha ASAP so we can update the docs and make things look really spiffy 🙂
I’m considering promoting i18n and DOM out of alpha for 2.5, which also changes the server stuff to use dynamic lib resolution to limit deps.
I agree, I just think we need to let the last alpha dom roll for an extra week, to be sure we have all the basis covered and real world tested
@eoliphant you can make that part of the state, one thing that can help you is the shared state: http://book.fulcrologic.com/#SharedState
that can make easier to access that part of the state anywhere on your views, but you can also use root ident queries, something like [{[:app/settings '_] [:setting/size]]}]
the later is better if your settings change a lot
it also matters what you mean by config. cljs and CLosure have some options you can configure through the compiler
ah sorry, i meant application stuff. for instance i’m porting an app that uses auth0 and Stripe. So the client ui needs keys and what have you to invoke their APIs
And I’d like to just piggyback on the server config managment as there are say dev vs production keys
a lot of that kind of stuff ends up in the low-level networking layers…so I’m not sure I’d use shared or app db
or are you embedding their components, and need to pass those things through UI code?
ah, yes, that’s the case. It’s the need to leverage their components in the client UI, properly initialized with stuff for your account, which again, might also involve prod vs dev/test configurations.
So, I agree with Wilker that the shared support in Fulcro is the best way to carry them to the UI in arbitrary places.
but the root query example has some advanges, you get a better render optimization using those
to refresh shared
you have re-render from root
ah, cool, so yeah 🙂
So, how about this:
1. Use server tricks, like the environ lib
2. Make a fulcro root query that pulls them from the server
3. Put them in the app db or an atom….if an atom, then shared-fn
could add them in
yeah I was just looking at something like just adding a ‘:client’ key to the existing config setup then just dropping that map into the shared state?
exactly, i’m trying to do this in the laziest manner possible lol. Meteor does something similar, anythign under a “public” key in their config map goes to the client
yeah, no need for anything that automatic…add :config
to your parser injection for queries…3 lines of code. done.
ah heck. sorry bear with me, I’m about 3 days into playing with fulcro lol. So ok, Shared state is a purely client concept, but i still need to get this map or whatever into it. You’re referring to the :parser-injections option on make-fulcro-server? I’m using a recent lein template, so think that’s already there
(defn build-server
[{:keys [config] :or {config "config/dev.edn"}}]
(make-fulcro-server
:parser-injections #{:config}
:config-path config))
but doing this allows me to then grab that stuff as part of the root query….put that in app state or an atom…shared is just a way of getting the values to components without having to query
(defquery-root :app.client/config
(value [env params]
(-> env :config :value :client-config)))
then on the client issue a load for it in :started-callback
.
(load app :app.client/config nil)
Now it’s in app state. If that same keyword (which is a function that can extract itself from a map) is your :shared-fn
, then it’ll pull that newly loaded value into shared and all components can see it through (prim/shared this)
Hi, I’m running into a weird issue, I’m using Cursive/Intellij, and have setup a remote REPL to point to the nREPL port 9000 that the shadow-cljs config exposes. Connects fine, but it seems to be a clojure, not clojurescript repl. No ‘js/’ vars, clj->js func, etc. anyone seen this?
@eoliphant latest shadow?
just saw this
(require '[shadow.cljs.devtools.api :as shadow])
(shadow/watch :the-build)
(shadow/nrepl-select :the-build)
Can anybody point me to an example of a dropdown that does not live in root and does not get build from initial-state but with data from a server read? So far my tries show up in state without the items. The scenario is a list of people to select from that gets read from the server.
@eoliphant its all in the docs 🙂 this means that you have not loaded your app in the browser