I\'m working on a react project (my first) and I\'ve recently restructured my folder structure to make a bit more sense.
To make my life easier, within my component
I use export that looks something like this. In react it worked well
export {default as PublicRoute} from './PublicRoute'; export {default as PrivateRoute} from './PrivateRoute';
Then, you can import like this wherever you need:
import {PublicRoute, PrivateRoute} from './config/router'; ...