{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react/issues/4571","labels_url":"https://api.github.com/repos/facebook/react/issues/4571/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react/issues/4571/comments","events_url":"https://api.github.com/repos/facebook/react/issues/4571/events","html_url":"https://github.com/facebook/react/issues/4571","id":99343667,"number":4571,"title":"What is the differ between parent-based context and child-based context,why the child-based context will be lost","user":{"login":"wenshiqi0","id":12891758,"avatar_url":"https://avatars.githubusercontent.com/u/12891758?v=3","gravatar_id":"","url":"https://api.github.com/users/wenshiqi0","html_url":"https://github.com/wenshiqi0","followers_url":"https://api.github.com/users/wenshiqi0/followers","following_url":"https://api.github.com/users/wenshiqi0/following{/other_user}","gists_url":"https://api.github.com/users/wenshiqi0/gists{/gist_id}","starred_url":"https://api.github.com/users/wenshiqi0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wenshiqi0/subscriptions","organizations_url":"https://api.github.com/users/wenshiqi0/orgs","repos_url":"https://api.github.com/users/wenshiqi0/repos","events_url":"https://api.github.com/users/wenshiqi0/events{/privacy}","received_events_url":"https://api.github.com/users/wenshiqi0/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/react/labels/Type:%20Question","name":"Type: Question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-06T03:07:00Z","updated_at":"2015-08-06T23:07:09Z","closed_at":"2015-08-06T11:54:29Z","body":"I want to use the material-ui for my react app.I do the same as material -ui says here is my code \r\n\r\n## index.js\r\n<pre>\r\n<code>\r\nvar React = require('react'),\r\n    mui = require('material-ui'),\r\n    ThemeManager = new mui.Styles.ThemeManager(),\r\n    RaisedButton = mui.RaisedButton;\r\nvar Index = React.createClass({\r\n    childContextTypes: {\r\n        muiTheme: React.PropTypes.object\r\n    },\r\n\r\n    getChildContext: function() {\r\n        return {\r\n            muiTheme: ThemeManager.getCurrentTheme()\r\n        };\r\n    },\r\n    render: function() {\r\n        return (\r\n            &lt;div&gt;\r\n                &lt;RaisedButton label=\"Default\" /&gt;\r\n            &lt;/div&gt;\r\n        );\r\n    }\r\n});\r\nmodule.exports = Index;\r\n</code>\r\n</pre>\r\n\r\n## reactapp.js\r\n<pre>\r\n<code>\r\n(function(){\r\n    var React = require('react/addons')\r\n    var Index = require('./component/index.js')\r\n    var injectTapEventPlugin = require('react-tap-event-plugin');\r\n\r\n    window.React = React;\r\n\r\n    injectTapEventPlugin();\r\n\r\n    React.render(&lt;Index /&gt; , document.body)\r\n})()\r\n</code>\r\n</pre>\r\n\r\nFirst I use the jsx tool to compile this two files and then I use browserify to browserify the reactapp.js to main.js and add it to my pages index.html but it reported this\r\n<pre>\r\n<code>\r\nWarning: owner-based and parent-based contexts differ (values: `undefined` vs `[object Object]`) for key (muiTheme) while mounting Paper (see: http://fb.me/react-context-by-parent)\r\n\r\nUncaught TypeError: Cannot read property 'component' of undefined\r\n\r\nbackgroundColor: this.context.muiTheme.component.paper.backgroundColor,\r\n</code>\r\n</pre>\r\n\r\nI did get to the http://fb.me/react-context-by-parent but did not make any sense so how do I solve this?\r\n"},"comment":{"url":"https://api.github.com/repos/facebook/react/issues/comments/128535862","html_url":"https://github.com/facebook/react/issues/4571#issuecomment-128535862","issue_url":"https://api.github.com/repos/facebook/react/issues/4571","id":128535862,"user":{"login":"spicyj","id":6820,"avatar_url":"https://avatars.githubusercontent.com/u/6820?v=3","gravatar_id":"","url":"https://api.github.com/users/spicyj","html_url":"https://github.com/spicyj","followers_url":"https://api.github.com/users/spicyj/followers","following_url":"https://api.github.com/users/spicyj/following{/other_user}","gists_url":"https://api.github.com/users/spicyj/gists{/gist_id}","starred_url":"https://api.github.com/users/spicyj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spicyj/subscriptions","organizations_url":"https://api.github.com/users/spicyj/orgs","repos_url":"https://api.github.com/users/spicyj/repos","events_url":"https://api.github.com/users/spicyj/events{/privacy}","received_events_url":"https://api.github.com/users/spicyj/received_events","type":"User","site_admin":false},"created_at":"2015-08-06T23:07:09Z","updated_at":"2015-08-06T23:07:09Z","body":"In addition, context is not and has never been documented or supported. Please don't file issues asking how to use it."}}