In my case the button and the modal is a single logical unit.
Splitting it into two components and share common state (ie flagShowModal) across

application seemis not a good idea.
I've found
a solution that is called Portal (or Gateway) (http://stackoverflow.com/questions/28802179/how-to-create-a-react-modalwhich-is-append-to-body-with-transitions).
The idea
, is that the Portal nothing renders in its own "render" function, but renders
child elements in a different place via ReactDOM.render on
componentDidUpdate event.

The text above was approved for publishing by the original author.

Previous       Next

נסו בחינם

אנא הכנס את הודעתך
אנא בחר באיזו שפה לבצע את התיקון

בדקו את תוסף ההגהה לגוגל דוקס!

eAngel.me

eAngel.me is a human proofreading service that enables you to correct your texts by live professionals in minutes.