{"action":"closed","issue":{"url":"https://api.github.com/repos/wix/react-native-navigation/issues/2708","repository_url":"https://api.github.com/repos/wix/react-native-navigation","labels_url":"https://api.github.com/repos/wix/react-native-navigation/issues/2708/labels{/name}","comments_url":"https://api.github.com/repos/wix/react-native-navigation/issues/2708/comments","events_url":"https://api.github.com/repos/wix/react-native-navigation/issues/2708/events","html_url":"https://github.com/wix/react-native-navigation/issues/2708","id":296320807,"number":2708,"title":"setOnNavigatorEvent throws in debug saying navigatorEventHandler is frozen","user":{"login":"no23reason","id":1748653,"avatar_url":"https://avatars2.githubusercontent.com/u/1748653?v=4","gravatar_id":"","url":"https://api.github.com/users/no23reason","html_url":"https://github.com/no23reason","followers_url":"https://api.github.com/users/no23reason/followers","following_url":"https://api.github.com/users/no23reason/following{/other_user}","gists_url":"https://api.github.com/users/no23reason/gists{/gist_id}","starred_url":"https://api.github.com/users/no23reason/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/no23reason/subscriptions","organizations_url":"https://api.github.com/users/no23reason/orgs","repos_url":"https://api.github.com/users/no23reason/repos","events_url":"https://api.github.com/users/no23reason/events{/privacy}","received_events_url":"https://api.github.com/users/no23reason/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-02-12T10:09:31Z","updated_at":"2018-03-13T14:16:29Z","closed_at":"2018-03-13T14:16:29Z","author_association":"NONE","body":"### Issue Description\r\n\r\nAfter adding `rightButtons` to a Screen and setting up the handler [as documented](https://wix.github.io/react-native-navigation/#/adding-buttons-to-the-navigator), when I run the app and open the screen using `showModal` I get the following error\r\n\r\n> Unhandled JS Exception: Error: You attempted to set the key `navigatorEventHandler` with the value `undefined` on an object that is meant to be immutable and has been frozen.\r\n>\r\n> This error is located at:\r\n>     in ModalLinkPopup (at Navigation.js:83)\r\n>     in Provider (at Navigation.js:82)\r\n>     in _class2 (at renderApplication.js:35)\r\n>     in RCTView (at View.js:71)\r\n>     in View (at AppContainer.js:102)\r\n>     in RCTView (at View.js:71)\r\n>     in View (at AppContainer.js:122)\r\n>     in AppContainer (at renderApplication.js:34)\r\n\r\nIf I remove the line shown below, the component displays properly.\r\n\r\n### Steps to Reproduce / Code Snippets / Screenshots\r\n\r\nRelated component:\r\n```ts\r\nimport React from \"react\";\r\nimport { ScrollView } from \"react-native\";\r\nimport {\r\n    NavigatorButtons,\r\n    NavigationComponentProps,\r\n} from \"react-native-navigation\";\r\n\r\nexport type ModalLinkPopupProps = NavigationComponentProps<{\r\n    content: any;\r\n}>;\r\n\r\nexport class ModalLinkPopup extends React.Component<ModalLinkPopupProps> {\r\n    static navigatorButtons: NavigatorButtons = {\r\n        rightButtons: [\r\n            {\r\n                title: \"Zavřít\",\r\n                id: \"back\",\r\n                systemItem: \"done\",\r\n            },\r\n        ],\r\n    };\r\n\r\n    constructor(props: ModalLinkPopupProps) {\r\n        super(props);\r\n        // the next line throws\r\n        this.props.navigator.setOnNavigatorEvent(this.onNavigatorEvent);\r\n    }\r\n\r\n    onNavigatorEvent = event => {\r\n        if (event.type === \"NavBarButtonPress\") {\r\n            if (event.id === \"back\") {\r\n                this.props.navigator.dismissModal();\r\n            }\r\n        }\r\n    };\r\n\r\n    render(): JSX.Element {\r\n        return (\r\n            <ScrollView>\r\n                {/* Content goes here */}\r\n            </ScrollView>\r\n        );\r\n    }\r\n}\r\n```\r\n\r\n---\r\n### Environment\r\n* React Native Navigation version: 1.1.375\r\n* React Native version: 0.52.2\r\n* Platform(s): both iOS and Android\r\n* Device info: iOS Simulator debug / Android Emulator (Android 7.1.1) debug\r\n"}}
{"actor":{"display_login":"no23reason"}}