{"action":"opened","issue":{"url":"https://api.github.com/repos/codemix/flow-runtime/issues/92","repository_url":"https://api.github.com/repos/codemix/flow-runtime","labels_url":"https://api.github.com/repos/codemix/flow-runtime/issues/92/labels{/name}","comments_url":"https://api.github.com/repos/codemix/flow-runtime/issues/92/comments","events_url":"https://api.github.com/repos/codemix/flow-runtime/issues/92/events","html_url":"https://github.com/codemix/flow-runtime/issues/92","id":221031701,"number":92,"title":"Instance variables undefined","user":{"login":"basilfx","id":815976,"avatar_url":"https://avatars0.githubusercontent.com/u/815976?v=3","gravatar_id":"","url":"https://api.github.com/users/basilfx","html_url":"https://github.com/basilfx","followers_url":"https://api.github.com/users/basilfx/followers","following_url":"https://api.github.com/users/basilfx/following{/other_user}","gists_url":"https://api.github.com/users/basilfx/gists{/gist_id}","starred_url":"https://api.github.com/users/basilfx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basilfx/subscriptions","organizations_url":"https://api.github.com/users/basilfx/orgs","repos_url":"https://api.github.com/users/basilfx/repos","events_url":"https://api.github.com/users/basilfx/events{/privacy}","received_events_url":"https://api.github.com/users/basilfx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-04-11T17:56:47Z","updated_at":"2017-04-11T17:56:47Z","closed_at":null,"body":"<!--\r\n  Thanks for using flow-runtime! To help us address your issue quickly please\r\n  provide as much information about the problem you're facing, or the feature you'd like adding.\r\n-->\r\n\r\nThis is a:\r\n\r\n - [X] Bug Report\r\n - [ ] Feature Request\r\n - [ ] Question\r\n - [ ] Other\r\n\r\nWhich concerns:\r\n\r\n - [X] flow-runtime\r\n - [X] babel-plugin-flow-runtime\r\n - [ ] flow-runtime-validators\r\n - [ ] flow-runtime-mobx\r\n - [ ] flow-config-parser\r\n - [ ] The documentation website\r\n\r\n---\r\n\r\n### What is the current behaviour?\r\n<!--\r\n  If this is a bug report or question, please include example code wherever possible.\r\n  If your code is private and you can't share it, please create a sanitized version\r\n  which reproduces the issue. You may find the online demo useful for this:\r\n  https://codemix.github.io/flow-runtime/#/try\r\n\r\n  NOTE: It is **extremely** difficult to fix bugs without examples!\r\n-->\r\n\r\n```es6\r\nexport default class Thumbnail extends React.Component<DefaultProps, Props, void> {\r\n    foo: boolean;\r\n\r\n    constructor(props: Props) {\r\n        super(props);\r\n\r\n        this.foo = true; // -> set to true!\r\n\r\n        console.log(this.foo); // -> true here.\r\n    }\r\n\r\n    render() {\r\n        console.log(this.foo); // -> undefined here, expected true.\r\n\r\n        return <span>Something</span>;\r\n    }\r\n}\r\n```\r\n\r\nAfter some debugging, I found the following 'difference':\r\n\r\n![schermafbeelding_2017-04-11_om_19_52_32](https://cloud.githubusercontent.com/assets/815976/24923105/d00cdb18-1ef0-11e7-8e1e-d2cdb2cb4713.png)\r\n\r\n---\r\n\r\n### What is the expected behaviour?\r\n<!--\r\n  Please describe what you'd expect to happen under these circumstances.\r\n  If you are describing a bug in the babel plugin, please indicate the output\r\n  you'd expect it to produce.\r\n-->\r\n\r\nThe expected behaviour is observed when I remove `flow-runtime` from my `.babelrc`. I expect to see `true` in the console once the `render()` method is invoked.\r\n\r\nThis is my `.babelrc`:\r\n\r\n```json\r\n{\r\n    \"presets\": [\r\n        [\"env\", {\r\n            \"targets\": {\r\n                \"chrome\": 57\r\n            },\r\n            \"modules\": false,\r\n        }],\r\n        \"react\",\r\n        \"stage-0\"\r\n    ],\r\n    \"plugins\": [\r\n        \"transform-runtime\",\r\n        \"transform-decorators-legacy\",\r\n        \"transform-react-display-name\",\r\n        \"react-hot-loader/babel\",\r\n        [\"flow-runtime\", {\r\n            \"assert\": true,\r\n            \"annotate\": true\r\n        }]\r\n    ]\r\n}\r\n```\r\n\r\n---\r\n\r\n### Which package versions are you using?\r\n<!--\r\n  If this is a bug, which version(s) of the affected package(s) are you using?\r\n  If you're describing a bug specific to an environment, like a certain browser\r\n  or node version, please include that information here too.\r\n-->\r\n\r\n* `flow-runtime@0.10.0`\r\n* `babel-plugin-flow-runtime@0.10.0`\r\n"}}
{"actor":{"display_login":"basilfx"}}