Fork me on GitHub
#fulcro
<
2017-10-13
>
Alister Lee06:10:51

thanks heaps. clear - let me assimilate this..

mitchelkuijpers13:10:50

I see this error in my console when trying to call set-state:

No queries exist for component path (atlas-crm.fulcro.router/Root atlas-crm.fulcro.router/TopRouter atlas-crm.fulcro.router/TopRouter-Union atlas-crm.sales.views/SalesView atlas-crm.sales.components.sale-funnel/Funnel atlas-crm.sales.components.sale-funnel/FunnelStage)
This path seems correct and exists. So not sure what causes this. I a trying to interface with react-dnd so maybe they are screwing something up

tony.kay17:10:45

@mitchelkuijpers This error is thrown when Om tries to figure out the focused query from root for a given refresh. What’s weird is I had always assumed component-local state did not run a query for refresh. But I’m looking at the code now, and it sorta looks like it does. That seems like not much of an optimization if it is true.

tony.kay17:10:09

Are you running set-state within a stateful or stateless component?

tony.kay17:10:09

actually if it is stateless, then it just uses React…it is only if it is stateful (has a query) that it does more

tony.kay17:10:40

Are you using path-opt?

tony.kay17:10:47

Does the component, or one above it, unmount/mount during your problematic sequence?

mitchelkuijpers17:10:09

It is a component that uses state for changing orders. For performance reasons

mitchelkuijpers17:10:51

I saw on om some related unreleased changes

mitchelkuijpers17:10:12

Will test out further tomorrow

mitchelkuijpers17:10:35

And we are not using path opt

mitchelkuijpers17:10:30

We fixed it for now by using react-set-state btw

tony.kay17:10:32

cool, but that still means there is a possible problem should you do a transact there, since it will run the same code sequence

mitchelkuijpers18:10:11

Yeah not a problem for now, but I ran into this problem two or three times before. Can never figure out the issue. I do give a function to another component somewhere that calls set-state

tony.kay18:10:57

It matters that set-state gets called by a component (e.g. the this) that is on-screen and will be refreshed

tony.kay18:10:37

if the component had been unmounted during the UI change, for example, then no query would be foudn for it because it wouldn’t be indexed anymore

mitchelkuijpers18:10:54

I thought this might be related but I might be wrong: https://github.com/omcljs/om/issues/860

tony.kay18:10:06

sounds likely

tony.kay18:10:49

unless that one is only triggered on explicit set-query sequences

mitchelkuijpers18:10:43

@tony.kay Just tested the change out, completely fixes the problem!

mitchelkuijpers18:10:39

@bnoguchi Is a total hero, could never figure out what I was doing wrong ^^

bnoguchi18:10:51

I think this is already merged into om? https://github.com/omcljs/om/pull/861

mitchelkuijpers19:10:29

Yeah but there is no version released yet

tony.kay18:10:10

sweet. I figured it was a bug

mitchelkuijpers18:10:30

Really needed the set-state, for showing a preview where something would drop on dragging stuff. om/transact is waaay to slow to do stuff like that.

tony.kay21:10:09

Everyone: I’m very interested in hearing if any of you are using dynamic queries (`set-query!`) beyond the DynamicRouter. The current design of Om Next’s dynamic queries is incompatible with some things I’d like to accomplish in Fulcro, but I have no desire to break existing applications that use Fulcro. So, feedback is strongly desired.

tony.kay21:10:46

I can definitely make changes that preserve apps that do not use dynamic queries, but an API change is necessary to fix things for dynamic queries.