Fork me on GitHub
#fulcro
<
2018-08-14
>
currentoor01:08:05

@cjmurphy why do you need the timeout?

currentoor01:08:26

just so you get other content to render before the load response comes back?

cjmurphy02:08:10

That's right. Otherwise (it seems) loading was taking over and the UI was not getting a chance. Within the component render method I'm just checking some props and if they are not there doing the (dom/div "Loading").

cjmurphy02:08:52

I was not seeing "Loading" until I put the timeout in. There was evidence that the "Loading" path was being taken, but it was so fleeting that "Loading" could not be seen.

currentoor17:08:52

ah i see, well you’d probably see the loading indicator with some real latency, i.e. not local dev setup

cjmurphy15:08:19

This seems like a strange error message to me: "The required namespace "taoensso.sente" is not available, it was required by "fulcro/websockets.cljs"." What I mean is should I have to include sente as a dependency? Just wanting to know if that is the intention. Usually libraries take care of their own dependencies don't they (don't use "provided")?

tony.kay15:08:21

@cjmurphy The intention is that if you don’t use Fulcro’s server stuff, you don’t get the deps.

tony.kay15:08:35

It intentionally does dynamic lib requires, and that is documented

tony.kay15:08:28

so yes, if you use anything server-like from Fulcro, you need to require the libs for ring, sente, etc.

👍 4
cjmurphy15:08:50

http://book.fulcrologic.com/#Websockets <- it's the first thing it says here, will read...

nha15:08:42

just curious - are the docs always the latest, or is there a way to get the older versions?

cjmurphy15:08:19

I think the book is quite good at at going through the changes that happened with different versions. So I would say the docs are intended to be used at their latest.

tony.kay15:08:14

@nha I do try to mention deltas…and I also try hard not to make changes that break things. The book is in DevelopersGuide.adoc in fulcro github, so it is versioned

💯 4
tony.kay15:08:49

oh, and all releases are tagged as well

tony.kay15:08:06

The make file in fulcro has the commands to build the HTML for the book

currentoor17:08:39

i’m already using datomic, but should i use pathom to convert datomic refs to fulcro idents?

currentoor17:08:45

or just do that by hand myself?

eoliphant17:08:21

I’m getting back into fulcro and using datomic as well. I’m sticking with pathom to make sure I have a consistent interface in case i need to grab any non-datomic stuff. Been mucking around with some ideas for utilities to take advantage of the om-next/pull fidelity to reduce pathom wiring for my default cases

currentoor18:08:46

@eoliphant yeah probably a good idea

currentoor18:08:05

if possible please share any good ideas you come up with simple_smile

4
tony.kay19:08:49

@currentoor convert to idents? The server has to send non-normalized data, so idents are probably wrong if that’s where pathom is being used

tony.kay19:08:03

or do you mean convert refs to db idents into keywords?

tony.kay19:08:10

(e.g. for enums)

currentoor19:08:32

@tony.kay oh your totally right!

currentoor19:08:18

i’m just now getting to entities across references on the server and i forgot it’s supposed to non-normalized 😅

wilkerlucio20:08:37

@currentoor pathom is about processing the query, it doens't normalize anything 😉 but yeah, keeping pathom will give you an extension engine to work on top of datomic data like other people already said 🙂

currentoor21:08:29

@tony.kay i have a situation where if i don’t specify initial-state on a component then the props are not correct, but simply adding :initial-state {} makes the props behave correctly

currentoor21:08:50

is this expected behavior? perhaps we should throw an error or warning?

cjmurphy21:08:38

My understanding is that specifying {} will give you a table record, perfect for a :singleton defsc. And not specifying anything - well you won't even get a table, let alone a record in that table.

currentoor23:08:39

turns out that was actually not the issue this time, but i have noticed some hard to debug weirdness with initial-state sometimes