Skip to content

Conversation

@geireann
Copy link
Collaborator

@geireann geireann commented May 13, 2024

This PR adds an additional renderLit function into the riteway/render-component path of this package to support Lit elements. The renderLit function takes in an element parameter of type TemplateResult and returns a Cheerio instance that can be used in the exact same way as the previous render for Lit elements.

The default render method will use renderReact and use the previous implementation.

Todo:

  • Add tests (having an issue with ESM vs CommonJS modules)
  • Update README

@geireann geireann changed the title Add renderLit export to render-component Add renderLit to render-component May 13, 2024
const $ = renderLit(html`<div>Text</div>`);
const contains = match($('.contents').html());

assert({
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test would fail, right?

@ericelliott
Copy link
Collaborator

We are using renderFixture and renderShadow in our platform repo. Should they be here?

@ericelliott
Copy link
Collaborator

What's the status of this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants