import React , { FunctionComponent } from "react" ; import useNotification from "./useNotification" ; const NotificationContainer = ( ) => { const { state } = useNotification ( ) ; if ( ! state . visible ) { return null ; } return < div role = "status" > { state . message } < /div>; } ; export default NotificationContainer ;