fast icon indicating copy to clipboard operation
fast copied to clipboard

docs: add examples and docs for vanilla JS usage of Contexts

Open slightlyoff opened this issue 8 months ago • 2 comments

🙋 Documentation Request

Documentation for the Contexts feature in FASTElement 2.0 is pretty rough. It's almost impossible to figure out how to use Contexts in an idiomatic way without Typescript, and the code examples in source aren't much help.

💁 Possible Solution

Explicit side-by-side docs for TS and JS everywhere, as well as plain-JS examples for every feature in the tree.

slightlyoff avatar Jun 23 '25 17:06 slightlyoff

@janechu I can take this one. I just went through all of this for a vanilla js project so it's fresh in memory.

KingOfTac avatar Jun 23 '25 21:06 KingOfTac

@slightlyoff Just to clarify, are you referring to the Context Protocol helper imported from @microsoft/fast-element/context.js?

KingOfTac avatar Jun 23 '25 21:06 KingOfTac