How to Add WheelWidget Script to React Website

If you're using React to build your website and want to add the WheelWidget script to it, follow these simple steps:

  1. Open your React project and navigate to the page where you want to add the WheelWidget script.
  2. In the component where you want to add the WheelWidget, add the following code to the render() method:
<div dangerouslySetInnerHTML={{ __html: '<script src="https://files.wheelwidget.com/wheel-widget.umd.js" async defer> </script> <wheel-widget id="YOUR_ID"></wheel-widget>' }} />

Make sure to replace "YOUR_ID" with your actual widget ID, which you can find in the admin panel of your WheelWidget account.

  1. Save your changes and reload your React application.

That's it! The WheelWidget script should now be installed on your React website. If you encounter any issues or have any questions, feel free to contact us.

We hope this instruction was helpful in adding the WheelWidget script to your React website. If you have any feedback or suggestions, please let us know.

This instruction didn't help me

Our support & Q team email