Skip to content

Commit

Permalink
internal fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bySabi committed Apr 6, 2019
1 parent ba5d905 commit ba2dabb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hookleton",
"version": "0.4.5",
"version": "0.4.6",
"description": "globalize your React Hooks without fear using the Hookleton Pattern",
"main": "lib/index.js",
"react-native": "lib/index.js",
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useMemo, useReducer, useLayoutEffect } from 'react';
import { useMemo, useReducer, useEffect } from 'react';

export function createHook(useHook, ...initial) {
const hookleton = new Hookleton(useHook, initial);
Expand Down Expand Up @@ -59,7 +59,7 @@ export class Hookleton {
useNonHost(ctx) {
// state is ignore because we have only one state already set in 'hookleton'
const [, updater] = useReducer(forceUpdate);
useLayoutEffect(() => {
useEffect(() => {
if (ctx.up) {
ctx.up.set(updater, updater);
return () => ctx.up.delete(updater);
Expand Down

0 comments on commit ba2dabb

Please sign in to comment.