This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-06-20
Channels
- # announcements (1)
- # beginners (164)
- # calva (70)
- # cider (26)
- # cljs-dev (6)
- # cljsrn (1)
- # clojars (3)
- # clojure (123)
- # clojure-berlin (1)
- # clojure-dev (5)
- # clojure-ecuador (9)
- # clojure-europe (2)
- # clojure-italy (14)
- # clojure-nl (21)
- # clojure-nlp (5)
- # clojure-portugal (1)
- # clojure-spain (3)
- # clojure-spec (26)
- # clojure-uk (47)
- # clojurescript (17)
- # clr (1)
- # code-reviews (7)
- # core-async (5)
- # cursive (8)
- # data-science (2)
- # datomic (28)
- # emacs (23)
- # events (1)
- # fulcro (43)
- # graalvm (6)
- # graphql (8)
- # immutant (5)
- # jackdaw (17)
- # jobs (1)
- # jobs-discuss (20)
- # joker (3)
- # leiningen (8)
- # luminus (12)
- # off-topic (61)
- # overtone (5)
- # pathom (2)
- # quil (1)
- # re-frame (15)
- # reagent (2)
- # reitit (23)
- # remote-jobs (1)
- # schema (1)
- # shadow-cljs (26)
- # tools-deps (56)
- # vim (4)
3.0.0-alpha-9 is on clojars. I did the clojure-side implementation of components today and got SSR pretty much working.
I also switched to ghostwheel stubs for the production release, which should turn off the internal spec validation. If anyone hits snags with things not compiling let me know.
Hello lads, I'm just getting into fulcro and have a question regarding testing. I'm very used to clojure.spec
but looking at fulcro-spec
I don't really see the appeal :( Can someone please illustrate what am I missing regarding fulcro-spec? What's its best use?
Fulcro spec was written before there was much in the way of clj(s) testing utilities. It has nothing to do with clojure.spec (it predates it)
These days it is primarily handy for when you need mocking in tests, or would prefer a lightweight alternative to is
that reads L->R
I have not ported forward the cljs renderer, but it also had much nicer output…but I only have time to maintain so much ;/
Oh, I see. Thanks @tony.kay, and thanks for all the work you put into fulcro, it is truly amazing. Will be checking it further.
@ tony.kay Hello Tony, I am interested in exploring Fulcro, but just read on https://fulcro.fulcrologic.com/vsom-next.html that the only client-db choice is built-in as db format. Does this mean that using datascript is not possible, even for things not related to fulcro, e.g. app domain stuff? I doubt it, but wanted to check nonetheless…
fulcro itself uses it’s built in normalized db format
however you can use the pathom library to write data resolvers that pull data from datascript in the client (or server wherever your data is)
normally people write pathom resolvers in the client to pull data from a REST API, but you can pull data from anywhere
so you can use that to get data from any source into fulcro’s DB
however fulcro’s query engine will only look in it’s built in DB
does that make sense?
also the book has a lot more information
@U09FEH8GN So I wouldn’t be able to simply stuff my domain data in a datascript DB inside a regular atom accessible globally? But I would have to write the pathom resolver to do just that, correct? If so, once done can I use the full datascript API against my domain data?
you would have to write pathom resolvers as an intermediary between datascript and fulcro
fulcro cannot directly depend on datascript
might help to read some of the pathom docs
i believe Tony considered using datascript directly in fulcro a long time ago
OK… sure that is a sure thing that fulcro can’t depend on ds, however for my domain data I would assume I can have my e.g. in-browser db the want I need it? Thx and sorry I didn’t read pathom, it looks a bit overwhelming for me right now 🙂
yeah it’s a lot to take in at once, totally understandable
It just seems to me that if I want to manipulate my Todo List, or Wedding Registry guest graph or whatever, I should be able to manipulate that within DS/Api right?
the key point is fulcro has a query engine and datastore built for satisfying queries from UI components, these are not configurable,
however you can write code to get data from any data source and fulcro can merge it into it’s state
That is totally expected that Fulcro needs the state DB for its own use according to its rules - but for the other stuff I wouldn’t expect to have to go through Fulcro?
Thx - from reading your last post, once resolved correctly and inserted into Fulcro’s merged state, my DS db could be accessed (using Fulcro of course) and queried any way I want (including ds/api full query engine), right? Sorry for the add-on question 🙂
yes through pathom resolvers yes
Great thanks @U09FEH8GN
i’m doing something just like that, except my resolvers are written in my server and the data source is datomic
i have another set of resolvers for a REST API and another set for nodeJS servers on embedded devices all in the same project
so there’s plenty of flexibility