DEV Community

Luís Correia
Luís Correia

Posted on

React: Multiple projects inside of a react-app?

Hello everyone!

( First time posting here )

I have a question in regards of: is it possible to have multiple projects inside of a react app?

What I mean is I don't want to have the same dependencies and styling.

For example: I have a portfolio website and I wanted to post my projects however I don't want to apply the same styling/dependencies as the main page.

Is this possible? Is it a good idea or should I do in a different approach?

Thanks in advance

Discussion (3)

mrpaulishaili profile image
Paul C. Ishaili

You should try React-Router, linking the user to the next App(s)

ninxe profile image
Luís Correia Author

Thanks for your reply, Mr. Paul. I'll definitely look further about this.

aarone4 profile image
Aaron Reese • Edited on

Not surè about the CSS but you should be able to have multiple React Apps on the same page. You inject a React Apps root component into a single DOM element. (<App> into <div id="root"> by convention) there is nothing to stop you doing a second getElementById("Portfolio1")