`requireNativeComponent` warns expected number of arguments
See original GitHub issueDescription:
Wrapping native UI Compnent using requireNativeComponent
shows a warning in ESLint checker.
React Native version:
System:
OS: macOS 10.15.3
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 12.13.0 - /usr/local/bin/node
Yarn: 1.22.0 - /usr/local/bin/yarn
npm: 6.12.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.5977832
Xcode: 11.3.1/11C504 - /usr/bin/xcodebuild
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.5 => 0.61.5
Steps To Reproduce
- Follow integration guide: https://reactnative.dev/docs/native-components-ios
- In section Properties,
requireNativeComponent
has now two arguments
Expected Results
No ESLint warning
Snack, code example, screenshot, or link to a repository:

Related issue: Issue 1741 in react-native-website
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Troubleshooting | React Navigation
I'm getting an error "requireNativeComponent: "RNCSafeAreaProvider" was not ... in native stack navigator expects a function returning a react element:.
Read more >Why does gcc allow arguments to be passed to a function ...
In C, a function declared with an empty parameter list accepts an arbitrary number of arguments when being called, which are subject to...
Read more >No warning when given function arguments mismatch earlier ...
Bug 48091 - No warning when given function arguments mismatch ... test.c The expected output is similar to other compilers i.e.: - a...
Read more >Ruby 3.0 changes - Ruby Documentation
Warning #warn : category: keyword argument. Ruby 2.7 introduced warning categories, and allowed to selectively suppress them with Warning[]= ...
Read more >Fix: 'warning: Using the last argument as keyword parameters ...
The explanation. In Ruby 2, you could pass a Hash as the last argument to the method that expects keyword arguments, and the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It used to take two arguments, but now it only takes one:
https://github.com/facebook/react-native/blob/22eb711c84587ac92da97e486fecaa79424fa925/Libraries/ReactNative/requireNativeComponent.js#L27
This change was made two years ago in https://github.com/facebook/react-native/commit/8dc3ba0444c94d9bbb66295b5af885bff9b9cd34 which first shipped with 0.56
@cHaLkdusT, did you find any resolution to your last comment?