S
S
Sergey2021-05-15 01:06:12
React
Sergey, 2021-05-15 01:06:12

What are the options for changing components for multiple applications?

There are 2 applications in react. They have the same components. These components are stored on a third resource and pulled into each project.
For example, a button component. She is blue. Wanted to change to red. I get into the code, into the component itself, change the color, push. Then in both projects I do a pull and a new build on the production.
1) Are there any other options for changing the component on the fly? So that everything is automatically pulled into projects when a component changes?
2) And if you can change something on the fly, then what if these applications are in the stores, Apple store, Google store?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Lewandowski, 2021-05-15
@vovaspace

You can set the theme (styles) in CSS custom properties (CSS variables) and send the theme file from the server.
But that's just for styles. The approach itself with common components in a separate package is the norm. If you change the API of a component, you definitely don't want it to change on its own in dependent packages.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question