-
Notifications
You must be signed in to change notification settings - Fork 23
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
Remove unnecessary container reducer and make <Subdivide> potentially controllable #6
Conversation
The second commit renames |
The last commit makes
The reason I want these two modes is because Subdivide should be usable as is, but it would also be nice if I could mount its state to my existing reducer tree. For example: Normal usageimport React, {Component} from 'react';
import ReactDOM from 'react-dom';
import Subdivide from './index';
class IframeComponent extends Component {
render() {
return (
<iframe src="index2.html" frameBorder={'0'} style={{
width: '100%',
height: '100%'
}} />
);
}
}
ReactDOM.render(
<Subdivide DefaultComponent={IframeComponent} />,
document.getElementById('root')
); Usage with
|
fb5d352
to
76c7a73
Compare
This removes
Container
and makeslayout
the top-level reducer. The diff doesn't do it justice, but really all that happened is I removedContainer
and made what was calledLayoutReducer
a top-level reducer, also renaming it to be called justlayout
.