A
A
Alexander1992020-08-07 12:22:02
Layout
Alexander199, 2020-08-07 12:22:02

How is the layout process on React?

I wanted to know how in large teams where they write on React they make up a project. Well, when I worked alone on React, I immediately divided everything into components, building the project architecture.

But how does this happen if there is a team work? In the same place, all 3-4 people will not conditionally work on layout, they will give this duty to one person. And how will this person work? At first, everything will be laid out in one html file, and then the team will divide it all into components, or will the one who is responsible for the layout divide everything into components in advance?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
Robur, 2020-08-07
@Alexandr199

In the same place, all 3-4 people will not conditionally work on layout,

why not? will be, if the work is built that way.
Layout in React, by definition, is inextricably linked with the component, if you catch up with something in html, then then remake it for React - the same amount of work, if not more.
There are several options:
1. creating a UI - a library of components, from which developers already build what they need. This requires a competent approach, but if done properly, it is very convenient. The developer, ideally, does not write a single html tag at all - everywhere there are just components from the library. on elements and on layout. The person responsible for the library already writes styles, layout, updates for design and so on inside.
2. When creating a component, each developer immediately thinks through and completely creates the layout for it.
3. developers saw something that works but looks like a dream of cubism, then it is given to a layout designer, who already stylizes, corrects tags, makes it look good and beautiful.
in all cases, the one who is responsible for the layout should of course know JSX and at least a basic understanding of how components are rendered into the DOM tree.

V
valza, 2020-08-08
@valza

You will make up in the same way only what is relevant to your task. Conditionally: you make a new sidebar, and your colleague makes a new header. And each of you make the appropriate logic, styles and layout.
It makes no sense to work on one section of code at the same time, there will be many conflicts

T
theuser, 2020-08-08
@theuser

Xs like others, but we have one who makes layouts and who writes js - different people. We have a component approach, so the one who makes the layout can create a react wrapper for the future component and simply shoves his markup into return. And only then another person (js-profile) writes the logic, interaction with the back, of this component and displays it where necessary.
There were no difficulties in terms of dividing work according to this principle, the project is 200+ people, it has been going on for 8 years. You work on a component in a branch, then push it to master.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question