question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`requireNativeComponent` warns expected number of arguments

See original GitHub issue

Description:

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

  1. Follow integration guide: https://reactnative.dev/docs/native-components-ios
  2. In section Properties, requireNativeComponent has now two arguments

Expected Results

No ESLint warning

Snack, code example, screenshot, or link to a repository:

image

Related issue: Issue 1741 in react-native-website

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
TheSaviorcommented, Mar 23, 2020
0reactions
ferdicuscommented, Jun 25, 2021

@cHaLkdusT, did you find any resolution to your last comment?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found