react-modal
react-modal copied to clipboard
Confusing props? Should we rethink them?
Perhaps we should consider standardizing on a set of "lifecycle" callbacks. We have some of these such as onAfterOpen
and onRequestClose
.
I'm thinking we should deprecate/remove them in favor of a standardized set such as:
-
onBeforeOpen
-
onAfterOpen
-
onReady
-
onBeforeClose
-
onAfterClose
That's really great. Also, I guess we can drop before
and after
from the names.
- onOpen
- onOpened
- onReady
- onClose
- onClosed
Looking at this again, I think I want to keep the Before
and After
just to make it very clear when these things will be fired. I figure it'll be less typo prone and more understood in the long run.
Are these still being worked on? I need to way to hook into the onBeforeOpen lifecycle.
@mdodge-ecgrow +1 I'm in the same position. I need to differentiate if the Modal has been opened by using the keyboard or the mouse in order to add an outline to the modal or not.
But my helper-class will be removed by the time it's onAfterOpen
's turn.