Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions packages/react/src/ReactHooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -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-<renderer> in your package.json",
);
}
return dispatcher;
}

Expand Down