Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translate TemplateComponent declaration #52

Open
F0rsaken opened this issue Jan 23, 2023 · 0 comments
Open

Translate TemplateComponent declaration #52

F0rsaken opened this issue Jan 23, 2023 · 0 comments
Labels

Comments

@F0rsaken
Copy link
Member

F0rsaken commented Jan 23, 2023

Proposed API

defineTemplateComponent(() => {
	// similarly to defineComponent
	const { requestUpdate, ...componentContext } = useTemplateComponentContext();

	// or template
	render(html => {
		return html``;
	})
})

We may move from lit-html in search for more reliable or more supported templating engine, like f.ex. JSX syntax, but it needs further investigations.

But more than that, API is relativelty similar to new defineComponent, or maybe it even should be defineComponent that handles render hook

@F0rsaken F0rsaken added the v3 label Jan 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant