Complete the code to display a simple message after deployment.
import React from 'react'; import { Text, View } from 'react-native'; export default function App() { return ( <View> <Text>[1]</Text> </View> ); }
The text "Hello, users!" shows a friendly message confirming deployment reached users.
Complete the code to navigate to the Home screen after deployment.
import React from 'react'; import { Button, View } from 'react-native'; export default function App({ navigation }) { return ( <View> <Button title="Go Home" onPress={() => navigation.[1]('Home')} /> </View> ); }
pop which goes back instead of forward.replace which replaces current screen.The navigate method moves the user to the Home screen after deployment.
Fix the error in the deployment status update function.
function updateStatus(status) {
if (status === [1]) {
console.log('Deployment successful');
}
}The status should be compared to the string 'success' with single quotes.
Fill both blanks to create a deployment status message component.
import React from 'react'; import { Text } from 'react-native'; export default function StatusMessage({ status }) { return <Text>{`Deployment is [1]: [2]`}</Text>; }
The message shows "Deployment is successful: " followed by the status value.
Fill all three blanks to create a function that returns deployment status text.
function getStatusText([1]) { return `Deployment [2] with code [3]`; }
The function takes status and code as inputs and returns a message like "Deployment completed with code 200".
