case 'componentC': default: }
} 然而,当我将道具传递给一个组件/函数时,即使电子邮件没有在type PropsA中定义(和其他组件一样),我也收到了很多Cannot call 'ComponentA' with 'props' bound to 'props' beca
A component将setState函数作为道具传递给child component。B component不会将setState道具传递给child component,因此,当B component被解雇时,会出现一个错误,即setState is not a function。或者,当只触发‘A组件’时,我如何执行setState函数?
我试图在ReactNavigation headerRight部分中通过引用字符串获取一个对象,但是,似乎我没有获得主类的正确实例,因为运行下面的代码会产生一个"undefined is not an object“。import { View, Text } from 'react-native';
export default class App extends React.C