fulcro

Book: http://book.fulcrologic.com, Community Resources: https://fulcro-community.github.io/, RAD book at http://book.fulcrologic.com/RAD.html
pvillegas12 2020-09-01T11:50:47.171Z

Is there an env based function for uism/begin! For uism?

tony.kay 2020-09-01T14:05:39.171600Z

no

tony.kay 2020-09-01T14:06:14.171900Z

but app is available in env

felipethome 2020-09-01T20:17:53.173200Z

Hi! Is there an example or documentation of using tx-intercept?

tony.kay 2020-09-01T21:30:04.173700Z

from F2? nope…don’t know of anyone that even used it

tony.kay 2020-09-01T21:30:18.174Z

didn’t even remember it was there 😜

felipethome 2020-09-01T21:35:50.177700Z

😄 , is there any way you can think of adding information to every transaction where this information comes from a parent component that may be lot of levels above the child? I have this situation where I would like to share information between all components of a specific part of the interface tree, similar to React Context

tony.kay 2020-09-01T21:40:03.178200Z

Fulcro shared, root link queries

tony.kay 2020-09-01T21:40:49.179100Z

you could also just use react context I think

tony.kay 2020-09-01T21:41:11.179500Z

ident-based queries are also an option if the parent has a constant ident

felipethome 2020-09-01T21:48:00.184500Z

My problem is a little complicated. It can’t be solved with shared or root link queries I have a map in the root table like this: {"some-customer-id" some-information} When rendering a specific portion of the ui the parent component will have ident [:customer/id "123"] then the parent knows how to get the information from the root, but then this information will need to be used way down the interface tree, where the ident of the components are not customer/id based anymore. And I can have multiple of this parents with different ids. I tried react context, but when it gets to define contextType static variable I couldn’t make it work. I’m tending to use prim/parent , and recursively go up in the components tree to get the information I need, but I guess you would say that is internal right?

tony.kay 2020-09-01T21:51:35.185200Z

using parent isn’t necessarily bad…it’s easy to encapsulate into a “search up” sort of thing

tony.kay 2020-09-01T21:51:53.185600Z

react context will work, you just have to figure out the interop incantation 🙂

felipethome 2020-09-01T21:53:40.187300Z

yes 😄 , I will give it another try! As you said using parent would be even easier, and for what I saw parent also exists in F3 right?

felipethome 2020-09-01T21:54:16.187800Z

because at some point in the future we are going to migrate to f3, so just checking

tony.kay 2020-09-01T21:59:33.188Z

yes

tony.kay 2020-09-01T22:00:26.188400Z

don’t think I added a helper function to get it, but it’s tracked, so that is an easy patch

felipethome 2020-09-01T22:11:06.188700Z

good to know, thank you!