Z
Z
zwezew2019-03-18 11:33:15
React
zwezew, 2019-03-18 11:33:15

How to change the parent of a component to react?

How to change the parent of a component, for example, a modal window? By default the component is called in the main App

<React.Fragment>                    
                    <Header />
                    <Main />
                    <Footer />
                    <Modal />
                </React.Fragment>

What can optionally be used to call the same component in another place, for example, in a block with a button that calls it? Use ref?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
davidnum95, 2019-03-18
@zwezew

modal windows. Where and how to render?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question