Skip to content

Latest commit

 

History

History
40 lines (24 loc) · 1.25 KB

File metadata and controls

40 lines (24 loc) · 1.25 KB

Plugin API reference – React components

This is the main documentation page for the Devcontainer plugin's React components.

Component list

ExampleDevcontainersComponent

This component is designed as a lightweight demonstration of the main useDevcontainers hook.

Its main functionality is:

  • Detecting whether the current repo entity being viewed supports has been tagged with the configured Dev Containers tag (as defined by the config options in DevcontainersConfig)
  • Displaying a link to launch the repo in a Dev Container via VS Code.

It does not have support for extensibility.

Type signature

declare function ExampleDevcontainersComponent(): JSX.Element;

Sample usage

<DevcontainersProvider config={devcontainersConfig}>
  <ExampleDevcontainersComponent />
</DevcontainersProvider>

Throws

  • Throws a render error if this component mounts outside of DevcontainersProvider

Notes

  • While this component was never designed to serve as more than a demo, if you feel that a polished version of this component could be helpful to you, please let us know by opening a GitHub issue.