From 3071e6b23d4188c9fb889710bd36337abb1535a3 Mon Sep 17 00:00:00 2001 From: bySabi Files Date: Sat, 6 Apr 2019 09:58:38 +0200 Subject: [PATCH] internal fix --- package.json | 4 ++-- src/simple.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 6d0a570..6602714 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "garfio", - "version": "0.1.5", + "version": "0.1.6", "description": "extending Hookleton Pattern namespaces and more", "main": "lib/index.js", "react-native": "lib/index.js", @@ -48,7 +48,7 @@ "url": "https://github.com/bySabi/garfio/issues" }, "dependencies": { - "hookleton": "^0.4.3" + "hookleton": "^0.4.6" }, "devDependencies": { "@babel/core": "^7.3.4", diff --git a/src/simple.js b/src/simple.js index 8e3ebc6..eef778f 100644 --- a/src/simple.js +++ b/src/simple.js @@ -1,4 +1,4 @@ -import { useMemo, useLayoutEffect } from 'react'; +import { useMemo, useEffect } from 'react'; import { createHook as createHookCore } from 'hookleton'; export function createHook() { @@ -6,7 +6,7 @@ export function createHook() { let h; function use() { const host = useMemo(() => !h && (h = true), []); - return host ? (useLayoutEffect(() => () => (h = false), []), hook.use()) : hook(); + return host ? (useEffect(() => () => (h = false), []), hook.use()) : hook(); } function useFn() { return use();