Is there an env based function for uism/begin! For uism?
no
but app
is available in env
Hi! Is there an example or documentation of using tx-intercept?
from F2? nope…don’t know of anyone that even used it
didn’t even remember it was there 😜
😄 , 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
Fulcro shared
, root link queries
you could also just use react context I think
ident-based queries are also an option if the parent has a constant ident
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?
using parent isn’t necessarily bad…it’s easy to encapsulate into a “search up” sort of thing
react context will work, you just have to figure out the interop incantation 🙂
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?
because at some point in the future we are going to migrate to f3, so just checking
yes
don’t think I added a helper function to get it, but it’s tracked, so that is an easy patch
good to know, thank you!