Skip to content
Permalink
Browse files

fix: use the more support raf instead of ric

  • Loading branch information...
dariocravero committed Jul 12, 2019
1 parent 993b2f1 commit 7fa58b43733fa2c2b07aa9a19d6a4e3657a5e987
Showing with 4 additions and 4 deletions.
  1. +3 −3 ensure-is-before.js
  2. +1 −1 package.json
@@ -1,18 +1,18 @@
import { promises as fs } from 'fs'
import path from 'path'

let USE_IS_BEFORE = `import { useEffect, useState } from 'react'
// This file is automatically generated by Views and will be overwritten
let USE_IS_BEFORE = `// This file is automatically generated by Views and will be overwritten
// when the morpher runs. If you want to contribute to how it's generated, eg,
// improving the algorithms inside, etc, see this:
// https://github.com/viewstools/morph/blob/master/ensure-is-before.js
import { useEffect, useState } from 'react'
export default function useIsBefore() {
let [isBefore, setIsBefore] = useState(true)
useEffect(function() {
let cancel = false
requestIdleCallback(function() {
requestAnimationFrame(function() {
if (cancel) return
setIsBefore(false)
})
@@ -1,6 +1,6 @@
{
"name": "@viewstools/morph",
"version": "19.6.7",
"version": "19.6.8",
"description": "Views language morpher",
"main": "index.js",
"type": "module",

0 comments on commit 7fa58b4

Please sign in to comment.
You can’t perform that action at this time.