Skip to content

Commit

Permalink
[React] Remove a bug work-around as it was fixed in the React Core
Browse files Browse the repository at this point in the history
Revert #4548 and keep the tests.
Here is the fix at the React level facebook/react#7125.
@puranjayjain you might be interested in seeing this.
  • Loading branch information
chowdream committed Jul 16, 2016
1 parent f6f001d commit 30f2e1d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ margin = (oldSize < 0.71) ?
((50 - 59.5 * oldSize) / 2) :
(5.25 * oldSize);
```

Examples:
```
// Before:
Expand All @@ -21,6 +20,11 @@ Examples:
<CircularProgress size={59.5} style={{margin: 5.25}} /> // Thickness is 3.5 by default
<CircularProgress size={119} thickness={7} style={{margin: 10.5}} />
```
(#4705)

- Remove a workaround regarding the context propagation as it was fixed in the React Core.
Upgrade to React v15.2.1 if you are affected. (#4729)


## 0.15.2
###### _Jul 7, 2016_
Expand Down
2 changes: 1 addition & 1 deletion docs/src/app/components/pages/customization/Themes.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ class ThemesPage extends Component {
actions={[
<FlatButton
label="Cancel"
keyboardFocus={true}
keyboardFocused={true}
onTouchTap={this.handleRequestCloseDialog}
primary={true}
/>,
Expand Down
13 changes: 2 additions & 11 deletions src/internal/RenderToLayer.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import React, {Component, PropTypes} from 'react';
import {Component, PropTypes} from 'react';
import {unstable_renderSubtreeIntoContainer, unmountComponentAtNode} from 'react-dom';

import Dom from '../utils/dom';
import MuiThemeProvider from '../styles/MuiThemeProvider';

// heavily inspired by https://github.com/Khan/react-components/blob/master/js/layered-component-mixin.jsx
class RenderToLayer extends Component {
Expand Down Expand Up @@ -110,15 +109,7 @@ class RenderToLayer extends Component {
}
}

/**
* We use the <MuiThemeProvider /> component as a work around for
* https://github.com/facebook/react/issues/6599.
*/
const layerElement = (
<MuiThemeProvider muiTheme={this.context.muiTheme}>
{render()}
</MuiThemeProvider>
);
const layerElement = render();
this.layerElement = unstable_renderSubtreeIntoContainer(this, layerElement, this.layer);
} else {
this.unrenderLayer();
Expand Down

1 comment on commit 30f2e1d

@puranjayjain
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @chowdream

Please sign in to comment.