I get an array like
{Path:xxx,
Component:"./xxx/ComPXX"}
from my API and based on that create my application's routes. At the moment I'm using React-Loadable (5.5.0) and React-Router (4.4.0-betax to avoid warnings in strict mode). See working example here.
Since React 16.6 has introduced React.lazy, I'm trying to migrate my solution, however I'm facing errors and difficulties however I try to do this. You can see migrated (failing) code here.
Any Idea why this isn't working? Can it be because React.Lazy doesn't accept variables?