Modify functional components event listener example (#6256)
Using Navigation.events().bindComponent() to register event listeners in functional components leads to typing errors when using Typescript, as bindComponent method requires a React.Component<any> as first argument.
With registerComponentListener we achieve the exact same effect, but providing more appropiate typings for for its parameters, using NavigationComponentListener for the listener, and making componentId required.