You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
✅ obj is supposed to know it is within inject, this is possible
❌ inject is supposed to make its props (foo="bar") the host context for all of its nested contents, obj should be able to access it. this is not possible
when getChildHostContext gets called for inject, we only have access to string type, not props. i thought i can return an empty object {} and fill it later in:
but when finalizeInitialChildren is called for inject it refers to root context, it can't refer to its own host context that was created by getChildHostContext.
i find this puzzling, we don't seem to have any relation between a host context and the element that created it.
solution
if we can access the current context it would be very useful to create a richer host context, that will also update.
alternatively, allowing us to receive props would at least allow for a static host context that doesn't update but at least carrier some deeper information.
in a custom renderer we would like to do something like this:
✅
obj
is supposed to know it is withininject
, this is possible❌
inject
is supposed to make its props (foo="bar") the host context for all of its nested contents,obj
should be able to access it. this is not possiblewe create a host context like this:
when
getChildHostContext
gets called forinject
, we only have access to string type, not props. i thought i can return an empty object{}
and fill it later in:but when
finalizeInitialChildren
is called forinject
it refers to root context, it can't refer to its own host context that was created bygetChildHostContext
.i find this puzzling, we don't seem to have any relation between a host context and the element that created it.
solution
if we can access the current context it would be very useful to create a richer host context, that will also update.
alternatively, allowing us to receive props would at least allow for a static host context that doesn't update but at least carrier some deeper information.
The text was updated successfully, but these errors were encountered: