Closed XantreDev closed 7 months ago
Also I have issue that rollup + esbuild clears this comments while bundling. This can be footgun for library authors Esbuild is not supporting keeping comments for example: https://github.com/evanw/esbuild/issues/1439
I believe PR #441 fixes the issue mentioned at the top. Functions wrapped in higher-order functions are supported. For example:
/** @trackSignals */
const C = memo(() => <div>{signal.value}</div>);
If you have an issue/concern with using rollup, etc. let's open a separate issue to discuss that.
If we are using
@trackSignals
directive - component can be untransformed without aware. Incorrect: Correct:I think this behaviour will be confusing for transform users, transform should throw error, at least, if cannot handle
@trackSignals
.Proposal:
Probably transform can also adapt more common directives pattern:
use client
,show source
,worklet
. Maybe something likeuse signals
.This syntax can be less confusing in terms of components wrapped in hocs