@lwc/engine-server
v8.9.0
Published
Renders LWC components in a server environment.
Downloads
290,173
Maintainers
Keywords
Readme
@lwc/engine-server
WARNING: This is an experimental package. It is subject to change, may be removed at any time, and should be used at your own risk!
This package can be used to render LWC components as strings in a server environment.
Supported APIs
This package supports the following APIs.
renderComponent()
This function renders a string-representation of a serialized component tree, given a tag name and an LWC constructor. The output format itself is aligned with the current leading proposal, but is subject to change.
import { renderComponent } from '@lwc/engine-server';
import LightningHello from 'lightning/hello';
const componentProps = {};
const serialized = renderComponent('lightning-hello', LightningHello, componentProps);