score:2

Accepted answer
React.useEffect(() => {
  if (transcript === "kitten") {
    const newImages = loadImages.concat({image: 'https://www.onlinekittencare.com/wp-content/uploads/2020/07/vChK6pTy3vN3KbYZ7UU7k3-1200-80.jpg'})
    setLoadImages(newImages);
  }
}, [transcript]);

Related Query

More Query from same tag