You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I searched issues and couldn’t find anything (or linked relevant results below)
Problem
Currently this package is only compatible with React-like JSX flavors, for example by outputting className for CSS classes, and camel cased CSS properties in the style object..
Solution
The underlying utility used in the recma plugin to create the jsx is hast-util-to-estree. This util has recently updated to support options to customize how it get rendered (for example, by using class instead of className, which is necessary for Solid).
These new options should be made available and passed through by this package, so that users can take advantage of them.
React uses their own style of attributes (similar to the DOM), such as
`className` instead of `class`.
Some ther frameworks don’t support that: they want you to pass `class`.
Similarly, React wants `WebkitBoxShadow`, while other frameworks want
`-webkit-box-shadow`.
This particularly becomes an issue around more complex things such as
SVG.
With this commit, you can now configure the exact style that your
particular framework accepts.
ClosesGH-2247.
React uses their own style of attributes (similar to the DOM), such as `className` instead of `class`.
Some ther frameworks don’t support that: they want you to pass `class`. Similarly, React wants `WebkitBoxShadow`, while other frameworks want `-webkit-box-shadow`.
This particularly becomes an issue around more complex things such as SVG.
With this commit, you can now configure the exact style that your particular framework accepts.
ClosesGH-2247.
ClosesGH-2255.
Reviewed-by: Christian Murphy <christian.murphy.42@gmail.com>
Initial checklist
Problem
Currently this package is only compatible with React-like JSX flavors, for example by outputting
className
for CSS classes, and camel cased CSS properties in the style object..Solution
The underlying utility used in the recma plugin to create the jsx is
hast-util-to-estree
. This util has recently updated to support options to customize how it get rendered (for example, by usingclass
instead ofclassName
, which is necessary for Solid).These new options should be made available and passed through by this package, so that users can take advantage of them.
Context: syntax-tree/hast-util-to-estree#7 (comment)
Alternatives
None :)
The text was updated successfully, but these errors were encountered: