How to update global context within code components or custom actions?

Hello everyone, is there any way to update global context within code components or custom action components? At the moment, when I update the global context value in code components, the value gets back to initial state when I refresh the page. So it is only persistent when I update the context value from Plasmic Settings tab.

Hey @sour_guanaco. Not sure if I understood correctly. Are you updating the default value for the global context props?

yes, that’s correct. I am providing a default value in global context props and trying to update it within code component.

@samuel I have a header code component and it receives some props like isFixed. hasLogo etc… And I can change these props on Plasmic sidebar and provide different values in each instance. But I want to add one more prop/context called navigationData and I want that prop to be same for all instances. So if I change navigationData in instance A, the changes should reflect in instance B. And I have a custom action Edit navigation where I can change navigationData in the form I built. Since prop value does not persist its value in each instance, is the global context prop the right choice for this use case?

“Edit navigation” lets you type in some data (say a JSON blob) that you want to provide? Is that data then stored as a prop for the component (via updateProps() )?