I've an asp.net core with reactjs project, I'm getting a list from the controller and…
Jump to turn (9)
- 1I've an asp.net core with reactjs project, I'm getting a list from the controlle
- 2edit the image path to be suitable for the component that is located in "C:\User
- 3no, i want you to edit this: "{imagePaths.map((imagePath, index) => ( ))}"
- 4Module not found: Error: Can't resolve '../taskimgs'
- 5no, it is located at C:\Users\kingk\Desktop\Cryptotaskys\cryptotasky\ClientApp\p
- 6Module build failed (from ./nodemodules/babel-loader/lib/index.js): SyntaxError:
- 7Module build failed (from ./nodemodules/babel-loader/lib/index.js): SyntaxError:
- 8what if the variable already has this path? "ClientApp/public/taskimgs/8194c3a6-
- 9The result should be like this: 'src="../../public/taskimgs/04aa7c33-4a23-49d6-b
- User
I've an asp.net core with reactjs project, I'm getting a list from the controller and the list contains an image path per item, how do i import each image? notice that they all share a common path which is: "ClientApp/public/taskimgs/imageName.png"
- Assistant
To import each image in your ASP.NET Core with React project, you can leverage the function provided by Webpack. Assuming your image paths are stored in an array called , you can iterate over the array and use the function to import the images.