From 20f91afd1b49cd346424411fb2881a51895ab092 Mon Sep 17 00:00:00 2001 From: Tom Chen Date: Wed, 11 Oct 2017 20:45:43 +0800 Subject: [PATCH] fix(withScriptjs): make compatible with `recompose@^0.26` * Closes #659 --- src/withScriptjs.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/withScriptjs.jsx b/src/withScriptjs.jsx index c1028eae..66f25cba 100644 --- a/src/withScriptjs.jsx +++ b/src/withScriptjs.jsx @@ -1,7 +1,7 @@ import _ from "lodash" import invariant from "invariant" import canUseDOM from "can-use-dom" -import { getDisplayName, createEagerFactory } from "recompose" +import { getDisplayName } from "recompose" import PropTypes from "prop-types" import React from "react" @@ -10,7 +10,7 @@ const LOADING_STATE_BEGIN = `BEGIN` const LOADING_STATE_LOADED = `LOADED` export function withScriptjs(BaseComponent) { - const factory = createEagerFactory(BaseComponent) + const factory = React.createFactory(BaseComponent) class Container extends React.PureComponent { static displayName = `withScriptjs(${getDisplayName(BaseComponent)})`