if you dont want to require the image then you have to put all your images into public folder and then
<img src={`../img/${img.code}.jpg`}></img>
this method will work.
More Related Contents:
- axios post request to send form data
- What is mapDispatchToProps?
- What is the best way to access redux store outside a react component?
- Simple Conditional Routing in Reactjs
- React-Redux: Actions must be plain objects. Use custom middleware for async actions
- How to reset TabNavigator when user logs out (from other screen)
- Next.js – Error: only absolute urls are supported
- Stop useEffect from running on mount
- Use Connect or pass data as props to children
- Use history.push in action creator with react-router-v4?
- Getting error Cannot read property ‘setState’ of undefined
- How does connect work without mapDispatchToProps
- React router, pass data when navigating programmatically?
- How to enable file upload on React’s Material UI simple input?
- how to async/await redux-thunk actions?
- Cache busting with CRA React
- how to set initial state in redux
- My Redux state has changed, why doesn’t React trigger a re-render?
- How do I see state when logging to the console instead of Proxy object inside reducer action?
- React Router work on reload, but not when clicking on a link
- Uncaught TypeError: Cannot read property ‘state or props’ of undefined
- Understanding React-Redux and mapStateToProps()
- How to stop /#/ in browser with react-router?
- Can’t import SVG into Next.js
- Could not proxy request /pusher/auth from localhost:3000 to http://localhost:5000 (ECONNREFUSED)
- Setting text color, outline, and padding on Material-ui Autocomplete component
- What is the alternative for Redirect in react-router-dom v 6.0.0?
- How to download image in reactjs?
- ReactJS: setState on parent inside child component
- create-react-app is not working since version 4.0.1