Skip to content

An example of how to use the render() lifecycle hook to switch between templates in a Lightning web component

Notifications You must be signed in to change notification settings

DNLZ/LWC-Render-Template-Example

Repository files navigation

LWC Render Lifecycle Hook Example

An example of how to use the render() lifecycle hook to switch between templates in a Lightning web component

Blog post: https://sfdc.danielzeidler.com/2019/07/12/using-the-lwc-render-lifecycle-hook-to-switch-templates/

Installation via SFDX

  1. Create a scratch org:
sfdx force:org:create -s -f config/project-scratch-def.json -a lwc-render-hook-example
  1. Push the app to your scratch org:
sfdx force:source:push
  1. Assign the LWC Render Lifecycle Hook Example permission set to the default user:
sfdx force:user:permset:assign -n LWC_Render_Lifecycle_Hook_Example
  1. Open the scratch org:
sfdx force:org:open
  1. In App Launcher, select the LWC Render Lifecycle Hook Example app.

About

An example of how to use the render() lifecycle hook to switch between templates in a Lightning web component

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published