Skip to content

Commit

Permalink
Merge pull request #4729 from oliviertassinari/react-remove-dead-code
Browse files Browse the repository at this point in the history
[React] Remove a workaround as it was fixed in the React Core
  • Loading branch information
oliviertassinari committed Jul 17, 2016
2 parents f522b60 + bb9915d commit 786687e
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

0 comments on commit 786687e

Please sign in to comment.