Answer the question
In order to leave comments, you need to log in
How to wrap another component with your component?
There is a functional component Cell. Inside it is a component with text. There are several such Cell components.
So how do I create it so that other components can be nested in it? I want to set a class in the Cell component 1 time so that I don’t have to constantly prescribe it.
Answer the question
In order to leave comments, you need to log in
export const CustomCell = ({children}) => {
return <Cell>{children}</Cell>
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question