This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-09-11
Channels
- # announcements (18)
- # beginners (57)
- # calva (20)
- # cider (4)
- # cljdoc (15)
- # cljs-dev (14)
- # clojure (124)
- # clojure-europe (5)
- # clojure-italy (5)
- # clojure-nl (10)
- # clojure-spec (4)
- # clojure-uk (44)
- # clojurescript (4)
- # clojutre (18)
- # clr (2)
- # cursive (25)
- # datomic (53)
- # emacs (18)
- # events (1)
- # figwheel-main (1)
- # fulcro (34)
- # joker (6)
- # kaocha (13)
- # nrepl (3)
- # nyc (24)
- # off-topic (1)
- # pathom (16)
- # protorepl (4)
- # re-frame (1)
- # reitit (27)
- # rewrite-clj (5)
- # shadow-cljs (38)
- # spacemacs (25)
- # sql (20)
- # vim (28)
- # xtdb (20)
Two more tutorials on YouTube (parts 10 and 11 uploading now) covering form input, and an intro to form state tracking. There are at least 2 more videos needed (4 total) to adequately cover form basics, but this is a start.
@tony.kay Right now, the dom tags used by Fulcro users are implemented either as a macro or as a function. Which of the two is used is open to potential misunderstandings. I propose the idea of exposing all the tag macros in an additional separate namespace, for the users who really care about using explicitly the macros instead of a function. For those macros, the (empty) props would have to be explicitly provided.
I am not sure if there would be a user need, however.
@vincent.cantin the difference should not affect behavior in any way (except performance), the macro versions are just an optimization (if you don't have anything dynamic, it can delegate directly to the react functions with zero overhead at runtime). makes sense?
Hi, I am evaluating Fulcro for a project and have been happy with what I saw so far. One of the requirements is that we provide an API to the server and transit/eql is definetelly not an option. Is it possible to make Fulcro use a different protocol (maybe GraphQL)? Any other approaches? Is it just not the use case for Fulcro?
hello, the requirement for the API, this is because you want to have external users to that as well, or is it something else?
It is a system that will mostly be called by the systems of our clients. Most of the traffic will come from them.
It’s exactly that 10% difference which will grow over time as you add more features to your frontend, which is going to be meant to be private that will bite you
customers usually just want a static REST endpoint to code against and are not prepared for the dynamic nature of GraphQL/Pathom
what I’m trying to say is that it’s easier to tighten down a dynamic construct, than to do dynamic requirements with static ones
see n+1 query problems with REST APIs for frotends which is why Fulcro is using this data access pattern in the first place
@UBEQ9K406 like @U08E8UGF7 said, exposing a REST API from pathom is quite trivial, the other direction takes more work
you can use Fulcro with GraphQL as well via pathom (there are some integrations there), but unless you are really looking for having a GraphQL, the approach with most gain and less effort is Pathom for Fulcro, and exposing a REST from Pathom, IMO
@UBEQ9K406 once you have the pathom resolvers in place, the implementation for each endpoint can be a pre defined query, something like:
(defroutes app
(GET "/user/:id" []
(let [data
(parser {} [{[:user/id id]
[:user/id :user/name :user/email]}])]
; you can also do adapter to rename keys if you must, but if you just output
; json the names will remain and the namespaces will be stripped
(get data [:user/id id])))
(route/not-found "<h1>Page not found</h1>"))
makes sense?
Hi guys! Could someone help me? I'm trying to follow fulcro3 book, but I can't even get the first example to work. http://book.fulcrologic.com/fulcro3/#_create_your_project
I have all the tools installed and created all files in the correct places, but when running npx shadow-cljs server
and go to localhost:8000 it is empty; console says Failed to load resource: the server responded with a status of 404 (Not Found)
. In fact, resources/public/js
folder doesn't even exist. shadow-cljs does not raise any warning or error, though
@tony.kay it says "You can start the compiler server with: navigate to the URL it prints out for the compiler server (usually http://localhost:9630). You can then use the "Builds" menu to turn on/off different client builds and see the progress live as it happens!". Since I am not familiar with shadow-cljs I assumed simply starting the server would do the trick and the "different builds" stuff was related to advanced/finer control tools