Fork me on GitHub
#fulcro
<
2020-09-01
>
pvillegas1211:09:47

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

tony.kay14:09:14

but app is available in env

felipethome20:09:53

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

tony.kay21:09:04

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

tony.kay21:09:18

didn’t even remember it was there 😜

felipethome21:09:50

😄 , 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.kay21:09:03

Fulcro shared, root link queries

tony.kay21:09:49

you could also just use react context I think

tony.kay21:09:11

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

felipethome21:09:00

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.kay21:09:35

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

tony.kay21:09:53

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

felipethome21:09:40

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?

felipethome21:09:16

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

tony.kay22:09:26

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

felipethome22:09:06

good to know, thank you!