solid icon indicating copy to clipboard operation
solid copied to clipboard

[solid-js/html] `<Show>` in `html` template renders function source code to DOM

Open trusktr opened this issue 2 years ago • 0 comments

Describe the bug

A template with <Show>, f.e.

html`
	<${Show} when=${() => true}>
		<p>asd</p>
	</${Show}>
`

renders the following DOM (the below is what you see on the screen):

function () { [native code] },>

Your Example Website or App

https://playground.solidjs.com/anonymous/b46ba5d0-593a-4762-9eb1-91b4e1903e58

Steps to Reproduce the Bug or Issue

  1. See playground
  2. see visual output

Expected behavior

It should handle the Show component

Screenshots or Videos

Screenshot 2024-01-14 at 11 41 18 AM

Platform

  • OS: [e.g. macOS, Windows, Linux]
  • Browser: [e.g. Chrome, Safari, Firefox]
  • Version: [e.g. 91.1]

Additional context

No response

Workaround

Switch to a ternary expression for now

trusktr avatar Jan 14 '24 19:01 trusktr