Help Me Solve "undefined" warning When Using <Show> Component
I'm using
Because
I'm trying to do that with
I thought adding the
So, how can I get rid of this "undefined" error?
I'm trying to do this "the solid way," and I can't figure it out.
I get the undefined error when trying to pass the
Here's the full component for context.
createAsync() to get and order record.order has the following type:const order: Accessor<Order | undefined>Because
order could be undefined, I must check for that in my jsx. I'm trying to do that with
<Show when={order()}>I thought adding the
when={order()} would return false if order() was undefined, and satisfy typescript, but typescript is still complaining with this message:So, how can I get rid of this "undefined" error?
I'm trying to do this "the solid way," and I can't figure it out.
I get the undefined error when trying to pass the
order to a component like this:<OrderTable order={order} />Here's the full component for context.
