Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[React] Remove a workaround as it was fixed in the React Core #4729

Merged
merged 1 commit into from
Jul 17, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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