import { Component, Host, Prop, State, h } from '@stencil/core'; import { sayHello } from '../../helpers/utils'; @Component({ tag: 'app-profile', }) export class AppProfile { @State() state = false; @Prop() name: string; formattedName(): string { if (this.name) { return this.name.slice(0, 1).toUpperCase() + this.name.slice(1).toLowerCase(); } return ''; } render() { return ( Profile: {this.name}

{sayHello()}! My name is {this.formattedName()}. My name was passed in through a route param!

Setting ({this.state.toString()}) (this.state = ev.detail.checked)} />
); } }