Text is dynamically updated but not the image

Identical command, but different outcomes for text and image.

I’m trying to get the 1st item in DB and display on the index page.

This is for the text

This is for the image

The only difference is that I’m trying to retrieve the “image” which is inside the “output”
image

I also tried to save the URL link into the db then tried to retrieve back to get a simultaneous load, but I’m facing another problem. I cannot add an item from the list to the the db.

it is not added

“random dog”

Maybe it’s because it’s 5am, but I don’t know what the heck you are actually trying to do…

Maybe try to explain what’s going on and what you are hoping to accomplish. You mention the first item in the DB, but clearly are calling the last one.

Are you just trying to compare things? What’s your goal.

I’m confused.

1 Like

Sorry for the confusion. It was 3am.

More visual example

This is the preview.

  1. It gets what’s inside the DB. COOL.

  1. When I write some input, ‘id’ (Just below Text update) is updated without refreshing the page, but the image disappears

  1. However, when I refresh the page, I get this. This is essentially updated 1)

  1. I want to display the image dynamically like the ‘id’

Fixed. CLOSED. Back to reactjs