Skip to content

Commit

Permalink
hooks are dead. long live hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
alexreardon committed May 14, 2018
1 parent bebb771 commit f7b265b
Show file tree
Hide file tree
Showing 5 changed files with 118 additions and 417 deletions.
8 changes: 5 additions & 3 deletions src/state/create-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ import reducer from './reducer';
import lift from './middleware/lift';
import style from './middleware/style';
import drop from './middleware/drop';
import hooks from './middleware/hooks';
import dropAnimationFinish from './middleware/drop-animation-finish';
import dimensionMarshalStopper from './middleware/dimension-marshal-stopper';
import autoScroll from './middleware/auto-scroll';
import pendingDrop from './middleware/pending-drop';
import type { DimensionMarshal } from './dimension-marshal/dimension-marshal-types';
import type { StyleMarshal } from '../view/style-marshal/style-marshal-types';
import type { Store, Hooks } from '../types';
import type { Store, Hooks, Announce } from '../types';

// We are checking if window is available before using it.
// This is needed for universal apps that render the component server side.
Expand All @@ -24,13 +25,14 @@ type Args = {|
getDimensionMarshal: () => DimensionMarshal,
styleMarshal: StyleMarshal,
getHooks: () => Hooks,

announce: Announce,
|}

export default ({
getDimensionMarshal,
styleMarshal,
getHooks,
announce,
}: Args): Store => createStore(
reducer,
composeEnhancers(
Expand Down Expand Up @@ -67,7 +69,7 @@ export default ({
autoScroll,

// TODO: where should this go?
// hooks(getHooks),
hooks(getHooks, announce),

),
),
Expand Down
317 changes: 0 additions & 317 deletions src/state/hooks/hook-caller.js

This file was deleted.

9 changes: 0 additions & 9 deletions src/state/hooks/hooks-types.js

This file was deleted.

Loading

0 comments on commit f7b265b

Please sign in to comment.