Skip to content

Instantly share code, notes, and snippets.

@svierk
Created April 9, 2022 14:40
Show Gist options
  • Select an option

  • Save svierk/db99dab1c7152db0fbea4a3a8ecff4ca to your computer and use it in GitHub Desktop.

Select an option

Save svierk/db99dab1c7152db0fbea4a3a8ecff4ca to your computer and use it in GitHub Desktop.
An example LWC that adds a classic greeting to any page
import { api, LightningElement } from 'lwc';
/**
* An example LWC that adds a classic greeting to any page.
* @alias HelloWorld
* @extends LightningElement
* @hideconstructor
*
* @example
* <c-hello-world name="World"></c-hello-world>
*/
export default class HelloWorld extends LightningElement {
/**
* Enter the name of the person to greet.
* @type {string}
* @default 'World'
*/
@api name = 'World';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment