From cf791b6537d725a7c6119cd5ae140a2338bc6189 Mon Sep 17 00:00:00 2001 From: "Leo Y. Li" Date: Thu, 11 Apr 2019 01:04:07 -0400 Subject: [PATCH] #14: add deprecation warning for React users --- addons/addon-contexts/src/index.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/addons/addon-contexts/src/index.ts b/addons/addon-contexts/src/index.ts index 09bec959e736..aea19ecf4999 100644 --- a/addons/addon-contexts/src/index.ts +++ b/addons/addon-contexts/src/index.ts @@ -1,3 +1,8 @@ import { withContexts } from './preview/frameworks/react'; export { withContexts }; export default withContexts; + +console.error( + "[addon-contexts] Deprecation warning: `import { withContexts } from 'addon-contexts'` has been " + + "deprecated. Please import from 'addon-contexts/react' instead." +);