mitosis icon indicating copy to clipboard operation
mitosis copied to clipboard

SolidJS: mitosis compiles the attribute "for" to "htmlFor"

Open kauderk opened this issue 2 years ago • 2 comments

I am interested in helping provide a fix!

Yes

Which generators are impacted?

  • [ ] All
  • [ ] Angular
  • [ ] HTML
  • [ ] Preact
  • [ ] Qwik
  • [ ] React
  • [ ] React-Native
  • [X] Solid
  • [ ] Stencil
  • [ ] Svelte
  • [ ] Vue
  • [ ] Web components

Reproduction case

https://mitosis.builder.io/?outputTab=M4ewNglgJkA%3D&code=KYDwDg9gTgLgBAE2AMwIYFcA29noHYDGMAlhHnALICeAwhALaR7B4wAUYUEYAzgFxwA3nGIIBPGFGJ4A5nAC%2BASiEAoOHCjAY6KOQA8mVACNgmOMmgBeQQHJDJzDfkA%2BW%2FdNO9AeneZnAbhV5FSA

Expected Behaviour

the "for" attribute shouldn't compile to "htmlFor"

Actual Behaviour

I know it's a small issue but I guess mitosis has to adapt to all the frameworks changes https://github.com/solidjs/solid/releases/tag/v1.4.0#:~:text=className%2C%20htmlFor%20deprecated

Additional Information

Maybe mitosis should accept version targets

kauderk avatar Dec 15 '23 13:12 kauderk

Just gotta remove this mapping!

https://github.com/BuilderIO/mitosis/blob/e862056eca675887bd975bf5696c61666d0f3532/packages/core/src/generators/solid/blocks.ts#L13

samijaber avatar Jan 18 '24 21:01 samijaber

let me try this

JerryWu1234 avatar Feb 19 '24 07:02 JerryWu1234