Fix warning message for new setNativeProps method. on -> with (#14909)
Eli White committed
Feb 20, 2019 at 23:53 UTC
f978d5fde4228843d09af9134e580a8403bd0371
3 files changed
+3
-3
packages/react-native-renderer/src/ReactNativeRendererSharedExports.js
+1
-1
@@ -19,7 +19,7 @@ export function setNativeProps(handle: any, nativeProps: Object): void {
19
if (handle._nativeTag == null) {
20
warningWithoutStack(
21
handle._nativeTag != null,
22
- "setNativeProps was called on a ref that isn't a " +
22
+ "setNativeProps was called with a ref that isn't a " +
23
'native component. Use React.forwardRef to get access to the underlying native component',
24
);
25
return;
packages/react-native-renderer/src/__tests__/ReactFabric-test.internal.js
+1
-1
@@ -287,7 +287,7 @@ describe('ReactFabric', () => {
287
ReactFabric.setNativeProps(viewRef, {foo: 'baz'});
288
}).toWarnDev(
289
[
290
- "Warning: setNativeProps was called on a ref that isn't a " +
290
+ "Warning: setNativeProps was called with a ref that isn't a " +
291
'native component. Use React.forwardRef to get access ' +
292
'to the underlying native component',
293
],
packages/react-native-renderer/src/__tests__/ReactNativeMount-test.internal.js
+1
-1
@@ -218,7 +218,7 @@ describe('ReactNative', () => {
218
ReactNative.setNativeProps(viewRef, {foo: 'baz'});
219
}).toWarnDev(
220
[
221
- "Warning: setNativeProps was called on a ref that isn't a " +
221
+ "Warning: setNativeProps was called with a ref that isn't a " +
222
'native component. Use React.forwardRef to get access ' +
223
'to the underlying native component',
224
],