You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 10, 2019. It is now read-only.
{
this.state.modalOpen &&
<div key="modal" className="modal__content" style={{background: '#F1F2F3'}}>
Hey I am a modal!
<a onClick={this._toggleModal} className="modal__close"></a>
</div>
}
to this:
{
this.state.modalOpen
? (
<div key="modal" className="modal__content" style={{background: '#F1F2F3'}}>
Hey I am a modal!
<a onClick={this._toggleModal} className="modal__close"></a>
</div>
)
: null
}
I will get errors:
Warning: Failed prop type: Required prop `styles` was not specified in `TransitionMotion`.
in TransitionMotion (created by Transition)
in Transition (created by Modal)
in aside (created by Modal)
in div (created by Modal)
in Modal (created by App)
in div (created by App)
in App
Uncaught TypeError: Cannot read property 'map' of null
at Constructor.getInitialState (VM690 TransitionMotion.js:234)
at new Constructor (VM529 ReactClass.js:670)
at eval (VM630 ReactCompositeComponent.js:296)
at measureLifeCyclePerf (VM630 ReactCompositeComponent.js:76)
at ReactCompositeComponentWrapper._constructComponentWithoutOwner (VM630 ReactCompositeComponent.js:295)
at ReactCompositeComponentWrapper._constructComponent (VM630 ReactCompositeComponent.js:281)
at ReactCompositeComponentWrapper.mountComponent (VM630 ReactCompositeComponent.js:189)
at Object.mountComponent (VM567 ReactReconciler.js:47)
at ReactCompositeComponentWrapper.performInitialMount (VM630 ReactCompositeComponent.js:372)
at ReactCompositeComponentWrapper.mountComponent (VM630 ReactCompositeComponent.js:259)
Difference is that, first example returns false and second returns null which should be valid react children.
The text was updated successfully, but these errors were encountered:
If I change in your example this:
to this:
I will get errors:
Difference is that, first example returns
false
and second returnsnull
which should be valid react children.The text was updated successfully, but these errors were encountered: