wp-pwa / saturn-app-theme-worona

Saturn theme for worona apps
1 stars 0 forks source link

Destroy smart ads using a random time to avoid blocking the CPU #68

Closed luisherranz closed 7 years ago

luisherranz commented 7 years ago

The API could be something like this:

<CreateAndDestroy 
  visible={active}
  destroy={Math.random(1000, 3000)}
  create={Math.random(100, 500)}}
  width={200}
  height={233}
>
  <SmartAd format={...} />
</CreateAndDestroy>
DAreRodz commented 7 years ago

It has been decided to use Transition from react-transition-group instead of implement a CreateAndDestroy component, as it can be used to fulfill the same task. Issue closed in commit ab9120606afef30e1f91714becbb842a643c131e.