A
A
Andrey2020-09-11 00:39:00
React
Andrey, 2020-09-11 00:39:00

How to implement admin panel in react?

The project requires an admin panel. How best to do it - in one large react application or split into 2. In the admin panel, for example, you may need the ability to add advertising banners with the ability to view their preview on the site page (the way they would look on the site, some CMS have a similar ability post preview). That is, you need the ability to access the components of the client application. I believe that it will be too cumbersome to shove everything into one application. What are the options? The UI elements in the admin are likely to be different from those in the client application. I read about monorepo but did not fully understand whether there is a possibility of communication between projects.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Robur, 2020-09-11
@hamsterhomka

It is possible and in one application it is possible and in two. If the functionality is completely different, then it is better in two separate

I read about monorepo but did not fully understand whether there is a possibility of communication between projects.

There is. Read more about yarn workspaces.
do with the module - app, admin panel, the common yarn code
will make symlinks in node_modules on top of each other.
further, the code from any module can be connected in any other simple import,
for example, if you have a module with a common code called "@hamsterhomka/common-ui" then in the admin panel and in the app you can write "import MyButton from '@hamsterhomka/common-ui /src/button'"
there is also lerna if yarn functionality is not enough

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question