sunech Posted February 26, 2022 Report Share Posted February 26, 2022 Is anyone using Revive with a single page application based on React? or aware of whether or not it will work out of the box? Would like to be able to use Revives single page call and ad zones initiated from different React component, but not sure how to implement it - and nothing appears to come up when searching for the Revive / React combination. Quote Link to comment Share on other sites More sharing options...
sunech Posted February 27, 2022 Author Report Share Posted February 27, 2022 Over the weekend my progress so far, is that I ruled out getting the spcjs to work - and moved on to the asyncjs implementation. Here I can display banners correctly, but I am having problems getting them to reload on page changes, despite the React component being re-rendered. Upon url change I am calling window.reviveAsync.REVIVEID.refresh(), but unfortunately the banner does not refresh. When I run it manually in the console it just returns undefined. I also tried calling reviveAsync.REVIVEID.apply(reviveAsync.REVIVEID.detect()), that I found in another thread, but it also just returns undefined. When exploring window.reviveAsync.REVIVEID in the console, it does have refresh/apply/detect properties though, so it seems weird that they are returning undefined? I I only call window.reviveAsync.REVIVEID.apply() it does not return undefined, but instead the error below: asyncjs.php?ts=1645982770238:1 Uncaught TypeError: Cannot read properties of undefined (reading 'zones') at Object.apply (asyncjs.php?ts=1645982770238:1:1712) at <anonymous>:1:53 Anyone have any input on what I might be doing wrong, or how they implemented Revive with React? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.