Skip to content

Commit 560acda

Browse files
author
Brian Vaughn
committed
Removed DEV warnings; they didn't follow precedent set by other hooks.
1 parent 876dd7c commit 560acda

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed

packages/react-reconciler/src/ReactFiberHooks.js

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -865,40 +865,8 @@ function useMutableSourceImpl<S>(
865865
source: MutableSource,
866866
config: MutableSourceHookConfig<S>,
867867
): S {
868-
if (__DEV__) {
869-
if (typeof config !== 'object' || config === null) {
870-
console.error(
871-
'Expected useMutableSource() second argument to be a config object. ' +
872-
'Instead received: %s.',
873-
config === null ? 'null' : typeof config,
874-
);
875-
}
876-
}
877-
878868
const {getSnapshot, getVersion, subscribe} = config;
879-
if (__DEV__) {
880-
if (
881-
typeof getSnapshot !== 'function' ||
882-
typeof getVersion !== 'function' ||
883-
typeof subscribe !== 'function'
884-
) {
885-
console.error(
886-
'Invalid useMutableSource() config specified. ' +
887-
'Config object should define getSnapshot, getVersion, and subscribe methods. ' +
888-
'See https://fb.me/useMutableSource for more information.',
889-
);
890-
}
891-
}
892-
893869
const version = getVersion();
894-
if (__DEV__) {
895-
if (version == null) {
896-
console.error(
897-
'useMutableSource() version should not be null or undefined.',
898-
);
899-
}
900-
}
901-
902870
const pendingExpirationTime = getMutableSourcePendingExpirationTime(source);
903871

904872
let isSafeToReadFromSource = false;

0 commit comments

Comments
 (0)