This extension adds some useful snippets on stencil tsx files.
- Launch Code (^1.15.0)
- From the command palette Ctrl-Shift-P (Windows, Linux) or Cmd-Shift-P (OSX)
- Select Install Extension
- Type stencil-snippets
- Choose the extension
- Reload Visual Studio Code
Type part of a snippet, press enter, and the snippet unfolds.
st-component // Generate a new web component
st-prop // Declares an exposed property/attribute
st-state // Declares an internal state of the component
st-watch // Declares a hook that runs when a property or state changes
st-element // Declares a reference to the host element
st-method // Declares an exposed public method
st-event // Declares a DOM event the component might emit
st-listen // Listens for DOM events
st-connected // Add the connectedCallback life cycle.
st-disconnected // Add the disconnectedCallback life cycle.
st-willload // Add the componentWillLoad life cycle.
st-didload // Add the componentDidLoad life cycle.
st-willrender // Add the componentWillRender life cycle.
st-didrender // Add the componentDidRender life cycle.
st-willupdate // Add the componentWillUpdate life cycle.
st-didupdate // Add the componentDidUpdate life cycle.