Fork me on GitHub
#fulcro
<
2019-09-13
>
exit218:09:21

How do you guys normally deal with looking into network calls from your front end to back end in Fulcro apps? All my stuff is through a centralized handler /api, but when inspecting network on that its a mess of query language and makes things a bit hard to parse

currentoor18:09:53

the network tab in the fulcro chrome extension is really easy to understand IMO

exit218:09:05

@U09FEH8GN I have the issue where the tool doesn’t detect my app as being connected. Any ideas on how to debug that?

currentoor19:09:44

uninstall and re-install it

currentoor19:09:48

the chrome extension

exit218:09:49

@wilkerlucio Any tips on debugging fulcro-inspect when it says the app isn’t connected? I’m trying to start using this tool now over dirac

exit219:09:10

I started digging into this a bit by building and using an unpacked version

exit219:09:13

Uncaught ReferenceError: framework is not defined
    at element_picker.cljs?rel=1568400659924:12
(anonymous) @ element_picker.cljs?rel=1568400659924:12
dom_history_viewer.cljs?rel=1568400661217:20 Uncaught ReferenceError: framework is not defined
    at dom_history_viewer.cljs?rel=1568400661217:20
(anonymous) @ dom_history_viewer.cljs?rel=1568400661217:20
client.cljs?rel=1568400661606:342 Uncaught ReferenceError: framework is not defined
    at client.cljs?rel=1568400661606:342

wilkerlucio19:09:20

@njj the only think I can remember is double checking if you are using the preload, because that's what triggers the start

wilkerlucio19:09:45

you can also try to call yourself so you can follow it closely, are you using Fulcro 2 or 3?

exit219:09:00

[fulcrologic/fulcro "2.5.9"]
[fulcrologic/fulcro-inspect "2.2.5"]

exit219:09:03

@wilkerlucio I’m using a pre-react 16 version

wilkerlucio19:09:03

(notice this must be called before the fulcro app is initialized, otherwise it will not get it)

wilkerlucio19:09:36

are you still unable to have the app shown in inspect right?

exit219:09:08

its just showing the No app connected

exit219:09:17

so if I find a way to call that (fulcro.inspect.client/install {}) myself, it could help figure out whats going on

exit220:09:00

@wilkerlucio it appears to be loading correctly w/ the preload stuff, I tested it out by calling the above fn before the app started and I got the same errors.

exit220:09:20

I’m using FC2, figwheel and dirac

exit220:09:45

so maybe part of the issue is no shadow?

wilkerlucio20:09:51

I never tried with dirac, I don't know much dirac so I dont understand how that may affect things

wilkerlucio20:09:04

it should work with Figwheel, but to be honest I have not used that in a long time

exit220:09:09

I disabled it

exit220:09:38

starts with: framework is not defined at element_picker.cljs:12

exit220:09:30

Interestingly enough one of the calls is Cannot read property 'call' of undefined when trying to call (fulcro.inspect.client/install {})

wilkerlucio20:09:55

yeah, strange, that framework message doens't help much

wilkerlucio20:09:19

the element picker is the only real UI thing that the inspect client has, but it still a very simple thing (with no external deps, expect react itself and some google closure things)

wilkerlucio20:09:53

are source maps not working with figwheel? are they enabled for you?

wilkerlucio20:09:04

if we had the cljs lines that could help

exit220:09:21

yeah I need to enable them

wilkerlucio20:09:00

oh, but now that I read carefully, seems like its point to the cljs source, but at a defsc line? :thinking_face: (that has only CSS)

wilkerlucio20:09:06

that makes no sense 😛

exit220:09:40

its pointing to the entire defsc fn

wilkerlucio20:09:54

yeah, and that's a defsc with just css definitions

exit220:09:26

well the call thing is interesting because its like the fn doesn’t exist

wilkerlucio20:09:27

can you try bumping fulcro?

exit220:09:47

what version do you recommend? Anytime I try to get into react 16 my entire app starts crapping 🙂

exit220:09:54

(this used to be an untangled app)

wilkerlucio20:09:58

I dont remember if latest fulcro versions work with react prior 16, so may worth trying, you could for 2.8.13 and see what happens

wilkerlucio20:09:11

if breaks, try getting one minor down, that will 8, 7 and 6

exit220:09:08

good idea, I’ll just bump down until things work

exit220:09:20

yeah right when I go to 2.6.0-RC1 which is where react-16 starts, everything starts failing

exit220:09:31

I guess let me focus on getting this to work first, then the inspect tool 🙂

Björn Ebbinghaus21:09:44

Is there a recommended way to render anything from any component into a singleton, like a modal? Like react portals? I thought about Dynamic Queries and Unions, but then I would have to implement the way how content renders in this singleton component.