Join Slack
Powered by
<This> article talks about importing the .wasm fil...
# touchlab-tools
m
Mohammed Akram Hussain
04/17/2025, 12:27 PM
This
article talks about importing the .wasm file in the HTML and then accessing it from the window object. How do I go about if I want to use Wasm in React which doesn't have any HTML file and all are .js files?
f
faogustavo
04/21/2025, 1:51 PM
Hey there, I'm not sure if I'm following your question. But you can probably: 1. Put the <script> import in the HTML file from your static folder (if you created with create-react-app) 2. Use the Script component if you use next (
https://nextjs.org/docs/pages/api-reference/components/script
) 3. Use a hook to change the HTML (
https://stackoverflow.com/a/34425083
)
Open in Slack
Previous
Next