I am trying to call a native ReactMethod from react native but it is throwing the following error:
C++ Exception in 'NativeModules': java.lang.RuntimeException: Got unknown argument class: Object
This is how I have the method defined in android:
@ReactMethod
public void setItem(String key, Object value) {
// code
}
This is how i am calling this method:
MyModule.setItem("mykey", "1234567890");
I wonder if ReactMethod supports object type as parameter or not? Because I want to set any type of item.