use double rAF instead of rIC for lazy pages

This commit is contained in:
Nolan Lawson 2018-03-27 19:46:01 -07:00
parent 148b1f1b38
commit bf0592aee4

View file

@ -2,11 +2,13 @@
<:Component {pageComponent} :params /> <:Component {pageComponent} :params />
{{/if}} {{/if}}
<script> <script>
import { scheduleIdleTask } from '../_utils/scheduleIdleTask'
export default { export default {
oncreate() { oncreate() {
scheduleIdleTask(() => this.set({revealed: true})) requestAnimationFrame(() => {
requestAnimationFrame(() => {
this.set({revealed: true})
})
})
}, },
data: () => ({ data: () => ({
revealed: !process.browser revealed: !process.browser