score:1
Accepted answer
it looks like your directory structure is different than you think.
you have a file named icons
in the same directory as your images. but you seem to be expecting icons
to be a directory, and your images to be inside that.
to fix it it you can either create the correct directory structure, or change your imports to:
import leftarrow from "./left-arrow.png";
Source: stackoverflow.com
Related Query
- Why can't i import my component from the same folder?
- How to call `connect` from the same component which has `Provider` context to import redux state?
- Why does typescript complain when I import a component, but not when the component is defined in the same file?
- How can i import more than one component from the same folder?
- React, how to access the DOM element in my render function from the same component
- React - Triggering a component method from another component, both belonging in the same render()
- How to import two component but same name from two libraries?
- Why is my component rendering when useState is called with the same state?
- Why does calling useState's setter with the same value subsequently trigger a component update even if the old state equals the new state?
- what is proper way to import multiple components from same file in react instead of getting each component imported
- How can I use react useContext , to show data from context, in the same component
- Why didn't the client folder from my project get uploaded on gitHub?
- Why can I not get a reference to my component from the ReactDOM.render() callback?
- Display data in a React component from an object where the keys are different but the values are the same
- React: why is the state returned from useState stays the same when the initializer function gets called on every re-render?
- Why is setState re-rendering the component when the value remains the same
- React Router "Link to" does not load new data when called from inside the same component
- how to get a Component variable from another component but their both in the same file React
- What's the best way to conditionally import a component from another component?
- Why does React render component for the second time after setting the state to the same value?
- React: setState to a single component from multiple mapped instances of the same component
- Why is my React Component always showing the same state?
- Why is this app code only working from the right side or else the ReactDOM.findDOMNode querySelector cant find className
- npm: import from outside the src folder
- Collect Data from the same component which is being rendered multiple times into an array to be sent to the server
- Why doesn't enzymes find() with component props work the same way when using full rendering or shallow rendering?
- How do I attach multiple event listeners to the same event of a child component from its parent component in React?
- Linking to a component from the same component doesn't work
- Why must I delete the node_modules folder every time I pull from github
- cant access the state in a functional component with useLocation from react-router-dom
More Query from same tag
- Retaining Firebase auth credentials after redirect
- How to convert this jQuery code to ReactJS code (React, jQuery, HTML, CSS)
- React handle error if user enters incorrect query format into search bar
- decoupled frontend and backend with Django, webpack, reactjs, react-router
- Error: EPERM : Operation not permitted,mkdir
- React.js Component Re-render
- How to dynamically update styled-components in React?
- Why is this Jest/Enzyme setState test failing for my React app?
- Can a mutable object in Redux store that is only mutated outside of Redux cause unexpected side effects?
- React: Reactstrap modal crashes app when closing
- React POST selected <li> item's ID
- PageSpeed Insights diagnostic "Ensure text remains visible during webfont load"
- Bar chart is not being updated when "untick" the checkboxes in React Hooks
- Clarification on Stores in Reactjs-Redux
- download image in react
- Accessing user uploaded images in a deployed MERN app
- retrieve data from asyncStorage in react native
- interface is not assignable to type Record<string, unknown>
- Get Array from JSON in reactjs
- Google Auto-ads on React.js application?
- Is the "no database" option removed for Gateway Microservice in JHipster v5.3.1?
- Can you hide certain react fragments rendered by array?
- React doesn't change to LoggedInView when Meteor user logs in
- react Portal - how to close modal when clicking outside of modal and how to assign ref to modal inside parent component rendering modal?
- Undocumented method of passing element children: as attributes instead of explicit children
- CSS difference when production vs. development
- React: background image won't show
- How to open a new instance of the browser in javascript / Reactjs?
- Redirect user after authorization where user previously clicked
- React Hook useEffect has missing .missing dependencies: 'Score', 'props', and 'windowDimension