SolidJSS
SolidJSโ€ข3y agoโ€ข
11 replies
lumenian

<Show> with number | null

What is the recommended way of using the Show component to conditionally render a number that can possibly be null? Currently, if you do the following, the number won't be rendered if its value is zero.

<Show when={nullableValue()}>
  {(value) => <>{value()}</>}
</Show>
Was this page helpful?