Last active
January 10, 2024 15:27
-
-
Save nickserv/22e4aa07c5cac3453f50c3badbd9d618 to your computer and use it in GitHub Desktop.
React script using module expression https://github.com/tc39/proposal-module-expressions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default function App() { | |
return ( | |
<> | |
<script> | |
{ | |
module { | |
import analytics from "..."; // Import an analytics library, possibly from a CDN | |
// Configure analytics library | |
} | |
} | |
</script> | |
{/* Use components that trigger analytics library calls */} | |
</> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment