Skip to content

Commit f978d5f

Browse files
authored
Fix warning message for new setNativeProps method. on -> with (#14909)
1 parent b0f45c0 commit f978d5f

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

packages/react-native-renderer/src/ReactNativeRendererSharedExports.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export function setNativeProps(handle: any, nativeProps: Object): void {
1919
if (handle._nativeTag == null) {
2020
warningWithoutStack(
2121
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 " +
2323
'native component. Use React.forwardRef to get access to the underlying native component',
2424
);
2525
return;

packages/react-native-renderer/src/__tests__/ReactFabric-test.internal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ describe('ReactFabric', () => {
287287
ReactFabric.setNativeProps(viewRef, {foo: 'baz'});
288288
}).toWarnDev(
289289
[
290-
"Warning: setNativeProps was called on a ref that isn't a " +
290+
"Warning: setNativeProps was called with a ref that isn't a " +
291291
'native component. Use React.forwardRef to get access ' +
292292
'to the underlying native component',
293293
],

packages/react-native-renderer/src/__tests__/ReactNativeMount-test.internal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ describe('ReactNative', () => {
218218
ReactNative.setNativeProps(viewRef, {foo: 'baz'});
219219
}).toWarnDev(
220220
[
221-
"Warning: setNativeProps was called on a ref that isn't a " +
221+
"Warning: setNativeProps was called with a ref that isn't a " +
222222
'native component. Use React.forwardRef to get access ' +
223223
'to the underlying native component',
224224
],

0 commit comments

Comments
 (0)