{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react-native/issues/5446","labels_url":"https://api.github.com/repos/facebook/react-native/issues/5446/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/5446/comments","events_url":"https://api.github.com/repos/facebook/react-native/issues/5446/events","html_url":"https://github.com/facebook/react-native/pull/5446","id":127821786,"number":5446,"title":"Add an 'Experiments' class to enable/disable experiments.","user":{"login":"satya164","id":1174278,"avatar_url":"https://avatars.githubusercontent.com/u/1174278?v=3","gravatar_id":"","url":"https://api.github.com/users/satya164","html_url":"https://github.com/satya164","followers_url":"https://api.github.com/users/satya164/followers","following_url":"https://api.github.com/users/satya164/following{/other_user}","gists_url":"https://api.github.com/users/satya164/gists{/gist_id}","starred_url":"https://api.github.com/users/satya164/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/satya164/subscriptions","organizations_url":"https://api.github.com/users/satya164/orgs","repos_url":"https://api.github.com/users/satya164/repos","events_url":"https://api.github.com/users/satya164/events{/privacy}","received_events_url":"https://api.github.com/users/satya164/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/react-native/labels/CLA%20Signed","name":"CLA Signed","color":"e7e7e7"},{"url":"https://api.github.com/repos/facebook/react-native/labels/GH%20Review:%20review-needed","name":"GH Review: review-needed","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":18,"created_at":"2016-01-21T01:06:08Z","updated_at":"2016-01-21T18:05:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/facebook/react-native/pulls/5446","html_url":"https://github.com/facebook/react-native/pull/5446","diff_url":"https://github.com/facebook/react-native/pull/5446.diff","patch_url":"https://github.com/facebook/react-native/pull/5446.patch"},"body":"To enable an experiment (say HMR),\r\n\r\n```java\r\nExperiments.enableExperiment(Experiments.HOT_MODULE_REPLACEMENT)\r\n```\r\n\r\nTo check if an experiment is enabled,\r\n\r\n```java\r\nif (Experiments.isExperimentEnabled(Experiments.HOT_MODULE_REPLACEMENT) {\r\n  // do stuff\r\n}\r\n```\r\n\r\nSee #5339 \r\n\r\nTest plan - In a fresh project \"Enable Hot Module Replacement\" shouldn't exist in dev menu. It should appear after enabling HMR in `MainActivity`'s `onCreate`."},"comment":{"url":"https://api.github.com/repos/facebook/react-native/issues/comments/173656972","html_url":"https://github.com/facebook/react-native/pull/5446#issuecomment-173656972","issue_url":"https://api.github.com/repos/facebook/react-native/issues/5446","id":173656972,"user":{"login":"facebook-github-bot","id":6422482,"avatar_url":"https://avatars.githubusercontent.com/u/6422482?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook-github-bot","html_url":"https://github.com/facebook-github-bot","followers_url":"https://api.github.com/users/facebook-github-bot/followers","following_url":"https://api.github.com/users/facebook-github-bot/following{/other_user}","gists_url":"https://api.github.com/users/facebook-github-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook-github-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook-github-bot/subscriptions","organizations_url":"https://api.github.com/users/facebook-github-bot/orgs","repos_url":"https://api.github.com/users/facebook-github-bot/repos","events_url":"https://api.github.com/users/facebook-github-bot/events{/privacy}","received_events_url":"https://api.github.com/users/facebook-github-bot/received_events","type":"User","site_admin":false},"created_at":"2016-01-21T18:05:39Z","updated_at":"2016-01-21T18:05:39Z","body":"Thanks for importing. If you are an FB employee go to https://our.intern.facebook.com/intern/opensource/github/pull_request/215773062097347/int_phab to review."}}