plasmicapp / plasmic

Visual builder for React. Build apps, websites, and content. Integrate with your codebase.
https://www.plasmic.app
MIT License
4.72k stars 382 forks source link

Plasmic Global Contexts doc lacks usage example #55

Open nounderline opened 1 year ago

nounderline commented 1 year ago

I'm thrilled at the power of Plasmic and trying to move more and more app logic into Plasmic. Now, I'm trying to implement local user state to see how UI changes over time (ie. checkout cart content.)

To do so, I wanted to use Global Context but after reading the doc page, I got confused on two fronts:

  1. There is no usage example. How should I use context values set in Studio from the code?
  2. There is no information on prop naming scheme when passing Global Context value thru GlobalContextsProvider.

I'd be glad to get an answer for these questions and also update the doc accordingly as I think this is a crucial information.

yang commented 1 year ago

This is great feedback, thank you! @jaslong maybe you can take a pass at this?