Y
Y
yumakaev2020-01-18 15:42:49
React
yumakaev, 2020-01-18 15:42:49

How to create a "wrapper" component in react?

Good health!
Tell me, conditionally, there are 100 pages with the same styles, how to create something like a wrapper so as not to copy it a hundred times? Something from the series:

<Wrapped>
   <Content />
<Wrapped />

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
camelCaseVlad, 2020-01-18
@camelCaseVlad

Do 100 pages with the same styles have the same components? If so, create H1, H2, Paragraph, etc. components and assemble the page from them.
Assemble one Page component and loop your [pages] array through it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question