Implementing iubenda on React JS website/app

Upvote this discussion if you would like us to add an integration guide specifically tailored for React web framework.


Importato da support.iubenda.com (topic #42000147746) · :+1: 26 upvote su Freshdesk · :eye: 7170 visualizzazioni

This would be very helpful. One specific challenge I have at present is displaying embedded policies. The script to render the policy appears only to trigger upon loading, which makes it necessary to unload/reload the script, or to load it multiple times.


When using a 'DRY' component to render policies, this is slightly tricky to achieve. It's an edge case, for sure, but I have (as iubenda recommends) separate policies for mobile apps vs web app vs website, it's possible for a site visitor to view a mobile policy, then the web site policy in succession. I haven't found an elegant way to re-render the policy when the policyId changes.

Hi! Is there any example I can follow on how to implement it on a React web app? On localhost everything seems to work great, but when I deploy my codebase, it doesn't load some Iubenda variables, not allowing users to interact with the modal. I tried implementing it putting the script in index.html and directly in React, but with no success. 
Thank you,

Federico

Hey,

 Can we also use it for WordPress websites? I want to use it for my WordPress website. If yes, please share any easy solution for adding it.

Yeah that is great idea. It will help many people around the world. I am looking forward to have it. Thanks!!

I have a similar problem. It works fine in localhost but when I deploy the codebase to my website mycplus it does not work.

This should also be available for WordPress websites. 

I'd like to use something specially done for React as well but it looks like Iubenda don't care about its users requests - it was asked a year ago and we don't even have any answer from them.

Thanks for providing this beautiful information.

Thankx

thanks

i have the same problem with vuejs because the component not accept scripts.

what can i do i this case, Does anyone have any advice for me?

THANKS

Can I implement this in Angular.js

Hi! Is there any example I can follow on how to implement it on a React web app? On localhost everything seems to work great, but when I deploy my codebase, it doesn't load some Iubenda variables, not allowing users to interact with the modal. I tried implementing it putting the script in index.html and directly in React, but with no success. 
Thank you 

Hi! Is there a React web app implementation sample I may use as a guide? On localhost, everything appears to be running smoothly, however when I deploy my codebase, some Iubenda variables are not loaded, making it impossible for users to interact with the modal. I attempted to do it by placing the script straight in React and index.html, but I was unable.

On localhost, everything appears to be running smoothly, however when I deploy my codebase, some Iubenda variables are not loaded, making it impossible for users to interact with the modal. I attempted to do it by placing the script straight in React and index.html, but I was unable.

You must first create a file named "iubenda.js" if you want to use iubenda on your ReactJS website or application. This file must be loaded into your ReactJS project because it contains the iubenda subway surfers codebase. You must initialise iubenda using the iubenda init function after adding it to your project.

 hello

2

Thanks for the information