Currently, callbacks are read from props of the MessageBar component. This limits our ability to define a different callback for each alert. State is already updated with props passed via MessageBar.showAlert function so why not use state to call these callbacks instead of component props? This way we can define different callbacks for each alert.
This also makes it easier to deal with callbacks when you have a single MessageBar component below top level parent component and simply update it each time.
Currently, callbacks are read from props of the MessageBar component. This limits our ability to define a different callback for each alert. State is already updated with props passed via MessageBar.showAlert function so why not use state to call these callbacks instead of component props? This way we can define different callbacks for each alert.
This also makes it easier to deal with callbacks when you have a single MessageBar component below top level parent component and simply update it each time.