diff --git a/packages/react/src/ReactHooks.js b/packages/react/src/ReactHooks.js index e5fa9d3a507..c1802e217d5 100644 --- a/packages/react/src/ReactHooks.js +++ b/packages/react/src/ReactHooks.js @@ -19,6 +19,13 @@ function resolveDispatcher() { dispatcher !== null, 'Hooks can only be called inside the body of a function component.', ); + if (__DEV__) { + warning( + typeof dispatcher.useState === 'function', + "It looks like you're using an older version of your renderer, " + + "make sure you've updated both react and react- in your package.json", + ); + } return dispatcher; }