Is there a way to access the instance / get a reference of the Component that it is currently rendered/active in SolidJS, an thus its current props, signals, internal state, effects etc.?
I am looking for something like React's __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner
(but consumable also in production) or Svelte's runtime internal get_current_component()
. To give a bit of context, the reason why I need it is because I am building a library that provides a function that should be able to access the props of the Component currently consuming this function.
I have tried to play around with SolidJS getOwner()
, but I am not sure I understood it. I cannot find any reference to the Component's current props or signals or effects.
Is there any way to achieve it in Solid, or is there any 'hack' to achieve something similar?
Thx in advance