fairly new to react.js, but prototyping a concept and getting stuck.
I want to have a component that delivers a variable name back (that it gets from an API), then based on that name, import a bunch of files that would share the same name in a folder structure, i.e.;
Folder structure
src/components/test/comp1.js
src/components/test/comp2.js
Then in my App component
import GetName from './components/apiRequest.GetName';
import Comp1 from './components/<GetName />/comp1';
Were GetName would deliver 'test' - But i can't do this, i just get a 'failed to compile' - any ideas on where i'm going wrong?