Hey there
I’m currently fetching some data on a CodeComponent and exposing this data using DataProvider, and also registering the component as providesData: true
Now this data is needed in all and any page created so I was thinking that needing to add this CodeComponent (is an attachment) everysingle time is kind of redundant… is there any way to expose data injected by DataProvider maybe at the App.tsx level? si its available everytime without the need creating and using a code component that will be needed in everysingle page
Hi Sebastian! Yes, instead of registering a component, you can register a global context with providesData: true
. This will make the data available everywhere in your project.
Here are some more details about global contexts: https://docs.plasmic.app/learn/global-contexts/
So that component is going to be auto included in all pages I create in plasmic?
Yes