Question: import React, { useState } from 'react'; import { View, Text, StyleSheet, Button } from 'react - native'; import { Picker } from ' @react
import React, useState from 'react';
import View, Text, StyleSheet, Button from 'reactnative';
import Picker from @reactnativepickerpicker;
export default function Category
const selectedFruit setSelectedFruit useStateselect;
const selectedQuantity setSelectedQuantity useState;
const totalPrice setTotalPrice useState;
const fruitPrices
apple:
banana:
orange:
grapes:
mango:
;
const vegetablePrices
potato:
carrot:
tomato:
cucumber:
spinach:
;
const addToBasket
const price fruitPricesselectedFruit vegetablePricesselectedFruit;
const subtotal price parseIntselectedQuantity;
const newTotalPrice totalPrice subtotal;
setTotalPricenewTotalPrice;
console.logAdding $selectedQuantity $selectedFruits to the basket. Total cost: $$newTotalPrice;
;
return
Vegetables
setSelectedFruititemValue
stylestylespicker
Fruits
setSelectedFruititemValue
stylestylespicker
Quantity
setSelectedQuantityitemValue
stylestylespicker
Arraykeysmapi
Total Cost of Order: $totalPricetoFixed
App developed by Bob, Bobb, and Bobbi
;
const styles StyleSheet.create
container:
alignItems: 'center',
justifyContent: 'center',
padding:
backgroundColor: #ecff
borderColor: #ecff
title:
fontSize:
fontWeight: 'bold',
textAlign: 'center',
paddingVertical:
picker:
width:
height:
borderColor: #ccc
borderWidth:
marginVertical:
totalPrice:
fontSize:
fontWeight: 'bold',
textAlign: 'center',
paddingVertical:
footer:
fontSize:
textAlign: 'center',
marginTop:
;
Q: What part of this code needs to be fixed so that 'App developed by Bob, Bobb, Bobby' is at the footer as a label, underneath the calculate button on snack expo on a snack?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
