-
-
Notifications
You must be signed in to change notification settings - Fork 95
Open
Description
The ref is undefined in componentDidMount. We have a condition where we need to show the modal when the components first render. Here is the code snippet
componentDidMount() {
this.skylightModal.show();
}
...
render(){
...
<SkyLight
hideOnOverlayClicked ref={ref => this.skylightModal = ref}
>...
...
}However, in componentDidMount, it throws the following error -
Uncaught TypeError: Cannot read property 'show' of undefinedNot sure if I am doing something wrong. Kindly help here.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels