react-dfp icon indicating copy to clipboard operation
react-dfp copied to clipboard

DFPSlotsProvider adUnit not updating in the DOM

Open tomellwood opened this issue 7 years ago • 0 comments

Hey, I'm having trouble updating the adUnit slot before running DFPManager.refresh()

If you set the DFPSlotsProvider and/or AdSlot adUnit to refresh based on an updated container state, you can see the actual props for these two components update, but the AdSlot rendered html does not update in the DOM.

For example, going from 'home/category1' to 'home/category2' seems to update the components props, but it doesn't update correctly in the DOM. Is there something I'm missing, do you need to completely destroy the ad units and then recreate them with the new adUnit prop?

After the react-dfp components have updated, running DFPManager.getRefreshableSlots() will still show the previous adUnits, e.g. 'home/category1'. Running DFPManager.refresh() will just refresh with the original adUnit.

tomellwood avatar Jan 22 '18 13:01 tomellwood