score:2

Accepted answer
const API_URL = `https://api.spaceXdata.com/v3/launches?limit=100`

const SpaceX = ({ missions }) => {
    const [allMissions, setAllMissions] = useState(missions)

    const filterResults = async (filter, value) => {
        const res = await fetch(`${API_URL}&${filter}=${value}`)
        const missions = await res.json()
        setAllMissions(missions)
    }

    return (
        {allMissions.map((mission) => <li>mission.name</li>)}
    )
}

Related Query

More Query from same tag