@juanrgm I took your comments seriously from the Solid 1.7 PR. I thought I'd take a quick look to see what I could do to resolve the type issues. Most things were trivial. The hardest part which I mostly left intact was that there are a bunch of APIs that take functions or not, basically treating JSX.Elements, Accessors, and Components as interchangeable. This is precisely what I'm trying to get stricter about in 1.7. Since I didn't want to impact API and I could tell equality checks were being used in places on functions (so changing to Getters was no good) I basically left stuff as is and just expanded the types.
I also changed inline mapArrays to <For> mostly a stylistic thing but it might actually be slightly more performant this way as we don't wrap Components whereas mapArray expressions would be.
Honestly you don't have to merge this if you have better idea of how to address the changes in 1.7 but I just wanted to take a look at how it would be for a component library in our ecosystem to do the migration. And I'm pretty happy overall. This enforces better patterns and makes what is going on much clearer.
@juanrgm I took your comments seriously from the Solid 1.7 PR. I thought I'd take a quick look to see what I could do to resolve the type issues. Most things were trivial. The hardest part which I mostly left intact was that there are a bunch of APIs that take functions or not, basically treating JSX.Elements, Accessors, and Components as interchangeable. This is precisely what I'm trying to get stricter about in 1.7. Since I didn't want to impact API and I could tell equality checks were being used in places on functions (so changing to Getters was no good) I basically left stuff as is and just expanded the types.
I also changed inline mapArrays to
<For>
mostly a stylistic thing but it might actually be slightly more performant this way as we don't wrap Components whereasmapArray
expressions would be.Honestly you don't have to merge this if you have better idea of how to address the changes in 1.7 but I just wanted to take a look at how it would be for a component library in our ecosystem to do the migration. And I'm pretty happy overall. This enforces better patterns and makes what is going on much clearer.