coryhouse / pluralsight-redux-starter

Completed Dev Environment for "Building Applications with React and Redux" on Pluralsight
https://app.pluralsight.com/library/courses/react-redux-react-router-es6/
1.27k stars 914 forks source link

Loading an image from my files. #56

Closed raphaelbp12 closed 7 years ago

raphaelbp12 commented 7 years ago

I'm trying to load an image in a <img /> tag. But the address http://localhost:3000/img/logo.png serves me my app broken, and give me an error:

Warning: [react-router] Location "/img/logo.png" did not match any routes

How can I do this? Thank you!

image

coryhouse commented 7 years ago

You can either:

  1. Require the image so it's loaded via webpack
  2. Create a build step that copies the image to your build directory.