I Created a Component namend GenreList but i cannot add it to my ComponentFactory

Here is my gist: https://gist.github.com/Rian0702/10c3e7068b8e15617bb034dcfffca495

And a picture of my App structure... i really hope i am missing to a slash or such simple thing. Let me know if you need anything else. Thanks for helping in advance.

enter image description here

up vote 4 down vote accepted

The first thing I would try changing is the import statement in GenreList.js to the following - note the absence of curly brackets {} and the adjusted path based on the folder structure:

import GenreList from 'music/components/GenreList/GenreList';

Currently, the statement is:

import { GenreList } from 'music/components/GenreList';

but the GenreList component is actually one level deeper in the path and the code uses a default export and not a named export, i.e. export default vs. export const GenreList.

  • thank you. I ended up using a index.js inside music/components. and imported genreList as: import GenreList from './GenreList/GenreList'; – EffGee Nov 18 '17 at 17:35

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.