我面临的问题TypeError : props.navigation.getParam不是函数。在(props.navigation.getParam('name'). 我正在使用reactNavigation version 5.x.此代码在reactNavigation 3. 我究竟做错了什么?
这是我的代码
export default class ChatScreen extends Component {
static navigationOption = ({ navigation }) => {
return {
title: navigation.getParam('name', null)
}
}
constructor(props) {
super(props);
this.state = {
person:{
name:props.navigation.getParam('name'),
phone:props.navigation.getParam('phone'),
// name:'Raushan',
// phone:9931428888
},
textMessage: ''
};
}
Run Code Online (Sandbox Code Playgroud)
状态部分值错误。堆栈导航器
`
const Stack = createStackNavigator();
function App() {
return (
<NavigationContainer>
<Stack.Navigator initialRouteName="Auth">
<Stack.Screen name="AuthLoading" component={AuthLoadingScreen} />
<Stack.Screen name="App" component={HomeScreen} options={{ title: …Run Code Online (Sandbox Code Playgroud) 这是我的代码 bcmul 未定义但我担心 bcmul 是用于将两个任意精度数相乘的 php 函数。但是laravel显示未定义为什么?
public function confirmBtcRequest(Request $request,$id){
$getBalanceInfo = $this->bitcoin->get_balance();
$sendAmount = bcmul($getBalanceInfo->data->available_balance, '0.01', 8);
print_r($sendAmount);
die;
}
Run Code Online (Sandbox Code Playgroud)
如果您有任何想法,请回复我。