score:2
if when you call the api it returns the url they are hosted on your s3 you can use them with a simple src attribute of the img tag. let say you get from your api a response like this:
[
{
url: 'some url',
name: 'some name
},
{
url: 'some url',
name: 'some name
},
]
you could store the data you got from the api in a state:
apicall()
.then((response) => this.setstate({ images: response );
then you could map throw this array in the render:
render() {
return (
<div>
{
images.map((image) => <img src={image.url} />)
}
</div>
)
}
Source: stackoverflow.com
Related Query
- importing images into ReactJS programmatically?
- Importing Public Folder Images In Src Css Files In Reactjs
- Issues with importing images for ReactJS App
- Turing images into greyscale or transparent in ReactJS component
- Importing images dynamically from JSON file in reactJS
- How to upload images into database using reactjs and php?
- reactjs importing imported JSON object into array-list
- Importing min.js file into ReactJS project
- ReactJS and images in public folder
- Embedding SVG into ReactJS
- Importing images in TypeScript React - "Cannot find module"
- Importing images breaks jest test
- React.js styled-components importing images and using them as div background
- How to import an entire folder of SVG images (or how to load them dynamically) into a React Web App?
- Load images based on dynamic path in ReactJs
- uncheck checkbox programmatically in reactjs
- Dynamically Loading Local Images with ReactJS
- Correct way of Creating multiple stores with mobx and injecting it into to a Component - ReactJs
- Reactjs How to insert react component into string and then render
- Multiple Axios Requests Into ReactJS State
- Can reactJS write into file?
- How to do POST in FORM Submit using reactjs and pass the object value into REST service?
- moving from twig to ReactJS: how to extend a template/component to build full reactJS pages? implement react-router and redux into symfony?
- Importing react into pages in next.js (and also React and CRA apps)
- Reactjs Importing from the same directory
- Correct way to programmatically fill a ReactJS input
- How to include the Match object into a ReactJs component class?
- How to import images from JSON data into create-react-app
- How to upload image using ReactJS and save into local storage?
- Can Reactjs programmatically handle :before?
More Query from same tag
- What is the best way to handle default values in controlled components?
- How to insert Blade code in a React component inside a Blade view?
- How do I get documents from Firebase / Firestore ordered by property value
- How can I forward the user to other page/path in react?
- Redux Spread Operator vs Map
- React Js Validation
- Axios post with react + jest
- React - useEffect
- How to get raw date string from date picker?
- conditional className in React?
- retrieve input values from creativebulma/bulma-tagsinput in React
- useTransition on Array return undefined Array propeties (React Spring)
- react-router - redirect private page to login page doesn't work
- How to improve webpack performance?
- Unable to display Date in JSX in ReactJS
- I can't get checked row data with onRowSelected in Material UI DataGrid
- Unable to load JSON file from API into state
- Single textinput component to handle password validation, login and email validation
- Plot polygon using react map gl
- Properly unmount React component
- react router not showing component on url update
- React execute common code on each route change
- React, filepond and default files from url addresses
- Typscript: Property 'value' does not exist on type 'string | { value: string; label: string; }
- Get image from server and preview it on client
- How to pass the value of AceEditor to the component state using the onClick of a button? ReactJS
- react/api - how to parse and map an array inside of api response
- Use props inside emotion's css string template
- Why doesn't my useState array get emptied?
- How to implement webpack-dev-server to share cookie from server-side rendered page?