Will react context work with mendix pluggable widgets?

0
I have two mendix widgets, a container and a widget that goes inside it. The container widget creates a react context and I am unable to access the context from the widget that is contained. Is this how mendix works? Is there any work around?
asked
3 answers
1

Why not merge 2 widgets in one(just defined different xml package file), and then you can use react hook context. 

answered
0

I hope Mendix can comment on what their plans are for this long term. Right now they're using true global state for context.

 

https://github.com/mendix/web-widgets/blob/main/packages/shared/widget-plugin-filtering/src/provider.ts#L73

answered
0

Dit you have a look at the component type 'widget' that can be fed as a child to your widget? See: https://docs.mendix.com/apidocs-mxsdk/apidocs/pluggable-widgets-property-types/#widgets

 

I implemented this feature in the Google Maps Custom Marker React widget; the infowindow popup on Google Maps is an actual Mendix dataview that can be fully styled in Studio Pro and then is accessible in the widget to show as a popup.

answered