Does the <Script> component accept attributes/props other than the ones listed in the docs?
Answered
Spectacled bear posted this in #help-forum
Spectacled bearOP
In
Does that code really work? I also wonder if I can add another attribute from goatcounter like
next-goatcounter there's this codereturn (
<Script
data-goatcounter={siteUrl}
src={scriptSrc ?? "//gc.zgo.at/count.js"}
strategy="afterInteractive"
/>
);Does that code really work? I also wonder if I can add another attribute from goatcounter like
data-goatcounter-settingsAnswered by joulev
aside from documented props,
<Script> accepts any props that <script> also accepts2 Replies
@Spectacled bear In `next-goatcounter` there's this code
return (
<Script
data-goatcounter={siteUrl}
src={scriptSrc ?? "//gc.zgo.at/count.js"}
strategy="afterInteractive"
/>
);
Does that code really work? I also wonder if I can add another attribute from goatcounter like `data-goatcounter-settings`
aside from documented props,
<Script> accepts any props that <script> also acceptsAnswer
@joulev aside from documented props, `<Script>` accepts any props that `<script>` also accepts
Spectacled bearOP
Okay. Thanks for the answer!