{"id":1014,"date":"2018-05-08T13:49:55","date_gmt":"2018-05-08T13:49:55","guid":{"rendered":"https:\/\/www.darrenlambert.com\/?p=1014"},"modified":"2018-05-15T20:23:36","modified_gmt":"2018-05-15T20:23:36","slug":"how-to-enable-hot-reloading-in-react-native","status":"publish","type":"post","link":"https:\/\/www.darrenlambert.com\/how-to-enable-hot-reloading-in-react-native\/","title":{"rendered":"How to enable Hot Reloading in React Native"},"content":{"rendered":"
By default Hot Reloading in React Native only works if you extend React.Component.
\nIf you are using your own base classes to inherit from you need to change the .babelrc file.<\/p>\n
Below is my working example. In the superClasses section you will see BasePanel and InfoPanel which are my base classes.<\/p>\n
{\r\n "presets": ["babel-preset-expo"],\r\n "env": {\r\n "development": {\r\n "plugins": [\r\n ["react-transform",\r\n {\r\n "transforms": [{\r\n "transform": "react-transform-hmr",\r\n "imports": ["react"],\r\n "locals": ["module"]\r\n }],\r\n "superClasses": ["BasePanel", "InfoPanel", "React.Component", "Component"]\r\n }\r\n ]\r\n ] \r\n }\r\n }\r\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"By default Hot Reloading in React Native only works if you extend React.Component. If you are using your own base classes to inherit from you need to change the .babelrc file. Below is my working example. In the superClasses section you will see BasePanel and InfoPanel which are my base classes. { "presets": ["babel-preset-expo"], "env": …<\/p>\n","protected":false},"author":1,"featured_media":1027,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[59],"tags":[],"yoast_head":"\n
How to enable Hot Reloading in React Native - Darren Lambert<\/title>\n\n\n\n\n\n\n\n\n\n\n\n\t\n\t\n\t\n\n\n\n\t\n\t\n\t\n