Open pionxzh opened 7 months ago
Not sure if it's a good idea; but you could also use inlined spread syntax like this:
const Comp = <div {...{ id: "x" }} />;
Though I wonder; would there be any reason to not expand it completely into something like this:
const Comp = <div id="x" />;
would there be any reason to not expand it completely into something like this:
const Comp = <div id="x" />;
If we want to implement props inlining, then the redundant {...{ ... } } will be removed.
@pionxzh I believe this should be reopened as per:
115 still needs the props inlining to be considered "completed". But let's merge this first.
Originally posted by @pionxzh in https://github.com/pionxzh/wakaru/issues/129#issuecomment-2102362186
Thanks.
Description
Constant tag name should be inlined into the JSX tag to reduce the noise.
source: https://github.com/pionxzh/wakaru/issues/113#issuecomment-1946779728
Input code
Expected behavior
Actual behavior