M
M
m_frost2019-05-12 16:26:28
React
m_frost, 2019-05-12 16:26:28

How to position elements in react and keep components reusable???

I can’t figure out how to position the elements so that they can then be reused conditionally there is the same button in several places how to position it. I heard something about wrappers but I can't figure out where to add them and where to prescribe their styles.
I would be very grateful for a detailed answer with a small example or some kind of sensible article in your opinion.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
McBernar, 2019-05-12
@m_frost

Wrap the component in a div.
Throw a class into the component.
Move inline styles to component props.
What do you like better.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question