Javier
Javier

Reputation: 2095

Is possible add multiple projects at the same path?

I have four projects.

First, Its called Portal and have some logical components. And the others manage other things.

Each of them has its own routes, but I would like to create a higher o superior routes to nav between all of them.

How can create that path to access to each project I dont have the component??

For example,

I want in one path have:

/portal    
  /login    
  /home
  /error 
/project1 
/project2 
/project3

This will be in portal, but in portal I dont have a Component called roject1.

<Route exact path="/project1" component={Project1} />

How can create that path to access to each project I dont have the component?? Or I should create it and make a redirect to Project1??

Thanks

Upvotes: 2

Views: 108

Answers (1)

Thoth
Thoth

Reputation: 2276

Yes, but you should create separate folders. It is generally bad practice to leave different projects in a single folder.

You can directly call files to be used with import { functionName } from './directory';

(further explanation can be found here)

Upvotes: 2

Related Questions