solid-docs
solid-docs copied to clipboard
TS forEach error in colored-list.tsx @ tutorial/props_children?solved
- https://www.solidjs.com/tutorial/props_children?solved
colored-list.tsx
Property 'forEach' does not exist on type 'Element'.
Property 'forEach' does not exist on type 'number'.(2339)
@Jutanium quick fix here
I'm not sure if this is a quick fix, we might need to add types to c in the solution - what would you suggest here?
When first writing modern JavaScript you might be tempted to use one of these keywords: var, new, this, class
Hmm I disagree with this advice. new Date is the correct pattern
Yeah I'll take new out of the advice at the beginning; I stand by it when writing your own Solid code (i.e., don't write code that is meant to be used by using new), but it's misleading because you don't really have a choice when consuming others' code